operator

package
v1.6.5-rc57 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: Apache-2.0 Imports: 17 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"`
	PaymasterKey string                `json:"paymasterKey,omitempty"`
	Type         enums.OperatorKeyType `json:"type,omitempty,default='1'"`
}

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)

Directories

Path Synopsis
types/mock
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.

Jump to

Keyboard shortcuts

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