navidrome/plugins/cmd/hostgen/testdata/counter_client_expected.go
2025-12-31 17:06:29 -05:00

28 lines
649 B
Go

// Code generated by hostgen. DO NOT EDIT.
//
// This file contains client wrappers for the Counter host service.
// It is intended for use in Navidrome plugins built with TinyGo.
//
//go:build wasip1
package main
import (
"github.com/extism/go-pdk"
)
// counter_count is the host function provided by Navidrome.
//
//go:wasmimport extism:host/user counter_count
func counter_count(uint64) int32
// CounterCount calls the counter_count host function.
func CounterCount(name string) int32 {
nameMem := pdk.AllocateString(name)
defer nameMem.Free()
// Call the host function
result := counter_count(nameMem.Offset())
return int32(result)
}