applet

package
v1.0.1-rc5 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateApplet

func CreateApplet(ctx context.Context, projectID types.SFID, r *CreateAppletReq) (mApplet *models.Applet, err error)

func GetBySFID added in v1.1.0

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

func RemoveApplet

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

func UpdateAndDeploy

func UpdateAndDeploy(ctx context.Context, r *UpdateAndDeployReq) error

func UpdateApplet

func UpdateApplet(ctx context.Context, appletID types.SFID, r *UpdateAppletReq) (err error)

Types

type CreateAppletReq

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

type GetAppletReq

type GetAppletReq struct {
	ProjectName string     `in:"path" name:"projectName"`
	AppletID    types.SFID `in:"path" name:"appletID"`
}

type GetAppletRsp

type GetAppletRsp struct {
	InfoApplet
	Instances []models.Instance `json:"instances"`
}

func GetAppletByAppletID

func GetAppletByAppletID(ctx context.Context, appletID types.SFID) (*GetAppletRsp, error)

type Info

type Info struct {
	AppletName string                `json:"appletName"`
	WasmName   string                `json:"wasmName"`
	Strategies []models.StrategyInfo `json:"strategies,omitempty"`
}

type InfoApplet

type InfoApplet struct {
	models.Applet
	Path string `db:"f_wasm_path" json:"-"`
}

type ListAppletReq

type ListAppletReq struct {
	IDs       []uint64     `in:"query" name:"id,omitempty"`
	AppletIDs []types.SFID `in:"query" name:"appletID,omitempty"`
	Names     []string     `in:"query" name:"names,omitempty"`
	NameLike  string       `in:"query" name:"name,omitempty"`
	datatypes.Pager
}

func (*ListAppletReq) Additions

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

func (*ListAppletReq) Condition

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

type ListAppletRsp

type ListAppletRsp struct {
	Data  []models.Applet `json:"data"`
	Hints int64           `json:"hints"`
}

func ListApplets

func ListApplets(ctx context.Context, r *ListAppletReq) (*ListAppletRsp, error)

type UpdateAndDeployReq

type UpdateAndDeployReq struct {
	File  *multipart.FileHeader `name:"file"`
	*Info `name:"info"`
	Cache *wasm.Cache `name:"cache,omitempty"`
}

type UpdateAppletReq

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

Jump to

Keyboard shortcuts

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