Help us shape the future of Go! Take the 2026 Go Developer Survey

root

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2026 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidOperator = errors.New("not a valid operator")
)

Functions

This section is empty.

Types

type Command

type Command interface {
	Execute(rpc clientrpc.RootRPCClient, msg *rootpb.Operator) (proto.Message, error)
	Name() string
}

type LicenseCmd added in v0.1.1

type LicenseCmd struct {
	New    LicenseNewCmd    `command:"new" description:"Create a new license"`
	Delete LicenseDeleteCmd `command:"delete" description:"Delete a license"`
	Update LicenseUpdateCmd `command:"update" description:"Update a license"`
	List   LicenseListCmd   `command:"list" description:"List all licenses"`
	Get    LicenseGetCmd    `command:"get" description:"Get a license by id"`
}

License命令结构体

type LicenseDeleteCmd added in v0.1.1

type LicenseDeleteCmd struct {
	ID string `long:"id" required:"true"`
}

type LicenseGetCmd added in v0.1.1

type LicenseGetCmd struct {
	ID string `long:"id" required:"true"`
}

type LicenseListCmd added in v0.1.1

type LicenseListCmd struct{}

type LicenseNewCmd added in v0.1.1

type LicenseNewCmd struct {
	Username  string `long:"username" required:"true"`
	Email     string `long:"email" required:"true"`
	MaxBuilds int    `long:"max-builds" required:"true"`
	Days      int    `long:"days" required:"true"`
}

type LicenseUpdateCmd added in v0.1.1

type LicenseUpdateCmd struct {
	ID        string `long:"id" required:"true"`
	MaxBuilds int    `long:"max-builds"`
	Days      int    `long:"days"`
}

type ListenerCommand

type ListenerCommand struct {
	Add   subCommand `command:"add" description:"Add a listener, e.g. 'listener add <name>'" subcommands-optional:"true" `
	Del   subCommand `command:"del" description:"Delete a listener, e.g. 'listener del <name>'" subcommands-optional:"true" `
	List  subCommand `command:"list" description:"List all listeners"`
	Reset subCommand `` /* 133-byte string literal not displayed */
}

ListenerCommand - Listener command

func (*ListenerCommand) Execute

func (*ListenerCommand) Name

func (ln *ListenerCommand) Name() string

type RootClient

type RootClient struct {
	// contains filtered or unexported fields
}

func NewRootClient

func NewRootClient(addr string) (*RootClient, error)

func (*RootClient) Execute

func (client *RootClient) Execute(cmd Command, msg *rootpb.Operator) error

type UserCommand

type UserCommand struct {
	Add   subCommand `command:"add" description:"Add a client user, e.g. 'user add <name>'" subcommands-optional:"true" `
	Del   subCommand `command:"del" description:"Delete a client user, e.g. 'user del <name>'" subcommands-optional:"true" `
	List  subCommand `command:"list" description:"List all client users"`
	Reset subCommand `command:"reset" description:"Reset user cert and regenerate auth file, e.g. 'user reset <name>'" subcommands-optional:"true" `
}

UserCommand - User command

func (*UserCommand) Execute

func (user *UserCommand) Execute(rpc clientrpc.RootRPCClient, msg *rootpb.Operator) (proto.Message, error)

func (*UserCommand) Name

func (user *UserCommand) Name() string

Jump to

Keyboard shortcuts

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