operator

package
v1.1.0-rc11 Latest Latest
Warning

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

Go to latest
Published: May 11, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultOperatorName = "default"

Variables

This section is empty.

Functions

func Create

func Create(ctx context.Context, r *CreateReq) (*models.Operator, error)

func GetByAccountAndName

func GetByAccountAndName(ctx context.Context, accountID types.SFID, name string) (*models.Operator, error)

func GetBySFID

func GetBySFID(ctx context.Context, id types.SFID) (*models.Operator, error)

func RemoveBySFID

func RemoveBySFID(ctx context.Context, id types.SFID) error

Types

type CondArgs

type CondArgs struct {
	AccountID types.SFID `name:"-"`
}

func (*CondArgs) Condition

func (r *CondArgs) Condition() builder.SqlCondition

type CreateReq

type CreateReq struct {
	AccountID  types.SFID `json:"-"`
	Name       string     `json:"name"`
	PrivateKey string     `json:"privateKey"`
}

type ListReq

type ListReq struct {
	CondArgs
}

type ListRsp

type ListRsp struct {
	Data  []models.Operator `json:"data"`
	Total int64             `json:"total"`
}

func List

func List(ctx context.Context, r *ListReq) (*ListRsp, error)

Jump to

Keyboard shortcuts

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