slave

package
v1.3.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 25, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConnectCode

func ConnectCode(f CodeHandle)

func ConnectGet

func ConnectGet(f GetHandle)

Types

type CodeHandle

type CodeHandle func(req *CodeRequest, resp *CodeResponse) (e error)

type CodeRequest

type CodeRequest struct {
	Context context.Context
	Code    string
}

type CodeResponse

type CodeResponse struct {
	ID     int64
	Parent int64
}

func Code

func Code(ctx context.Context,
	code string,
) (result *CodeResponse, e error)

type GetHandle

type GetHandle func(req *GetRequest, resp *GetResponse) (e error)

type GetRequest

type GetRequest struct {
	Context context.Context
	ID      int64
}

type GetResponse

type GetResponse struct {
	ID          int64
	Name        string
	Description string
	Code        string
	Parent      int64
}

func Get

func Get(ctx context.Context,
	id int64,
) (result *GetResponse, e error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL