operator

package
v1.4.3-poc-rc3 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2023 License: Apache-2.0 Imports: 12 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 ListByCond added in v1.2.2

func ListByCond(ctx context.Context, r *CondArgs) ([]models.Operator, error)

func Migrate

func Migrate(ctx context.Context)

will delete at next version

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 {
	Name       string `json:"name"`
	PrivateKey string `json:"privateKey"`
}

type Detail added in v1.2.2

type Detail struct {
	models.Operator
	Address string `json:"address"`
}

func GetDetailByAccountAndName added in v1.2.2

func GetDetailByAccountAndName(ctx context.Context, accountID types.SFID, name string) (*Detail, error)

func GetDetailBySFID added in v1.2.2

func GetDetailBySFID(ctx context.Context, id types.SFID) (*Detail, error)

type ListDetailRsp added in v1.2.2

type ListDetailRsp struct {
	Data  []Detail `json:"data"`
	Total int64    `json:"total"`
}

func ListDetail added in v1.2.2

func ListDetail(ctx context.Context, r *ListReq) (*ListDetailRsp, error)

type ListReq

type ListReq struct {
	CondArgs
	datatypes.Pager
}

func (*ListReq) Additions added in v1.2.2

func (r *ListReq) Additions() builder.Additions

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