project

package
v1.0.1-rc3.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateOrUpdateProjectEnv added in v1.0.0

func CreateOrUpdateProjectEnv(ctx context.Context, env *wasm.Env) error

func CreateProjectSchema added in v1.0.0

func CreateProjectSchema(ctx context.Context, schema *wasm.Schema) error

func GetProjectByProjectName

func GetProjectByProjectName(ctx context.Context, prjName string) (*models.Project, error)

func InitChannels

func InitChannels(ctx context.Context, hdl mq.OnMessage) error

func RemoveProjectByProjectID

func RemoveProjectByProjectID(ctx context.Context, prjID types.SFID) error

Types

type AppletDetail

type AppletDetail struct {
	AppletID        types.SFID          `json:"appletID"`
	AppletName      string              `json:"appletName"`
	InstanceID      types.SFID          `json:"instanceID,omitempty"`
	InstanceState   enums.InstanceState `json:"instanceState,omitempty"`
	InstanceVMState enums.InstanceState `json:"instanceStateVM,omitempty"`
}

type CreateProjectReq

type CreateProjectReq struct {
	models.ProjectName
	models.ProjectBase
	Envs   [][2]string  `json:"envs,omitempty"`
	Schema *wasm.Schema `json:"schema,omitempty"`
}

type CreateProjectRsp

type CreateProjectRsp struct {
	*models.Project `json:"project"`
	Envs            [][2]string  `json:"envs,omitempty"`
	Schema          *wasm.Schema `json:"schema,omitempty"`
}

func CreateProject

func CreateProject(ctx context.Context, r *CreateProjectReq, hdl mq.OnMessage) (*CreateProjectRsp, error)

type Detail

type Detail struct {
	ProjectID   types.SFID     `json:"projectID"`
	ProjectName string         `json:"projectName"`
	Applets     []AppletDetail `json:"applets,omitempty"`
	datatypes.OperationTimes
}

func GetProjectByProjectID

func GetProjectByProjectID(ctx context.Context, prjID types.SFID) (*Detail, error)

type ListProjectReq

type ListProjectReq struct {
	IDs        []uint64     `in:"query" name:"ids,omitempty"`
	ProjectIDs []types.SFID `in:"query" name:"projectIDs,omitempty"`
	Names      []string     `in:"query" name:"names,omitempty"`
	NameLike   string       `in:"query" name:"name,omitempty"`
	datatypes.Pager
	// contains filtered or unexported fields
}

func (*ListProjectReq) Additions

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

func (*ListProjectReq) Condition

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

func (*ListProjectReq) SetCurrentAccount

func (r *ListProjectReq) SetCurrentAccount(accountID types.SFID)

type ListProjectRsp

type ListProjectRsp struct {
	Data  []Detail `json:"data"`  // Data project data list
	Total int64    `json:"total"` // Total project count under current user
}

func ListProject

func ListProject(ctx context.Context, r *ListProjectReq) (*ListProjectRsp, error)

Jump to

Keyboard shortcuts

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