applet

package
v1.2.0-rc2 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetBySFID added in v1.1.0

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

func Remove added in v1.1.0

func Remove(ctx context.Context, r *CondArgs) error

func RemoveBySFID added in v1.1.0

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

Types

type CondArgs added in v1.1.0

type CondArgs struct {
	ProjectID types.SFID   `name:"-"`
	AppletIDs []types.SFID `in:"query" name:"appletID,omitempty"`
	Names     []string     `in:"query" name:"names,omitempty"`
	NameLike  string       `in:"query" name:"name,omitempty"`
	LNameLike string       `in:"query" name:"lName,omitempty"`
}

func (*CondArgs) Condition added in v1.1.0

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

type CreateReq added in v1.1.0

type CreateReq struct {
	File *multipart.FileHeader `name:"file"`
	Info `name:"info"`
}

func (*CreateReq) BuildStrategies added in v1.1.0

func (r *CreateReq) BuildStrategies(ctx context.Context) []models.Strategy

BuildStrategies must be built. if nil default strategy returned

type CreateRsp added in v1.1.0

type CreateRsp struct {
	*models.Applet
	*models.Instance `json:"instance"`
	*models.Resource `json:"resource,omitempty"`
	Strategies       []models.Strategy `json:"strategies,omitempty"`
}

func Create added in v1.1.0

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

type Detail added in v1.1.0

type Info

type Info struct {
	AppletName string                `json:"appletName"`
	WasmName   string                `json:"wasmName,omitempty"`
	WasmMd5    string                `json:"wasmMd5,omitempty"`
	WasmCache  *wasm.Cache           `json:"wasmCache,omitempty"`
	Strategies []models.StrategyInfo `json:"strategies,omitempty"`
}

type ListDetailRsp added in v1.1.0

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

func ListDetail added in v1.1.0

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

type ListReq added in v1.1.0

type ListReq struct {
	CondArgs
	datatypes.Pager
}

type ListRsp added in v1.1.0

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

func List added in v1.1.0

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

type UpdateReq added in v1.1.0

type UpdateReq struct {
	File *multipart.FileHeader `name:"file,omitempty"`
	Info `name:"info"`
}

func (*UpdateReq) BuildStrategies added in v1.1.0

func (r *UpdateReq) BuildStrategies(ctx context.Context) []models.Strategy

BuildStrategies try build, if invalid nil return

type UpdateRsp added in v1.1.0

type UpdateRsp = CreateRsp

func Update added in v1.1.0

func Update(ctx context.Context, r *UpdateReq) (*UpdateRsp, error)

Jump to

Keyboard shortcuts

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