mirror of
https://github.com/navidrome/navidrome.git
synced 2026-04-03 06:41:01 +00:00
- Implemented hostgen tool to generate wrappers from annotated Go interfaces. - Added command-line flags for input/output directories and package name. - Introduced parsing and code generation logic for host services. - Created test data for various service interfaces and expected generated code. - Added documentation for host services and annotations for code generation. - Implemented SubsonicAPI service with corresponding generated code.
15 lines
242 B
Go
15 lines
242 B
Go
package testpkg
|
|
|
|
import "context"
|
|
|
|
type User struct {
|
|
ID string
|
|
Name string
|
|
}
|
|
|
|
//nd:hostservice name=Users permission=users
|
|
type UsersService interface {
|
|
//nd:hostfunc
|
|
Get(ctx context.Context, id *string, filter *User) (*User, error)
|
|
}
|