root

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2025 License: Apache-2.0 Imports: 16 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" subcommands-optional:"true" `
	Del  subCommand `command:"del" description:"Delete a listener" subcommands-optional:"true" `
	List subCommand `command:"list" description:"List all listeners"`
}

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 user" subcommands-optional:"true" `
	Del  subCommand `command:"del" description:"Delete a user" subcommands-optional:"true" `
	List subCommand `command:"list" description:"List all users"`
}

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