client

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: May 13, 2022 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetRole

func GetRole(c *gin.Context) []string

func NewAppCenterClient

func NewAppCenterClient(c *config.Config) *appCenterClient

NewAppCenterClient NewAppCenterClient

func NewAppCenterMockClient

func NewAppCenterMockClient(c *config.Config) *appCenterClient

NewAppCenterMockClient NewAppCenterMockClient

Types

type AlterADDResp

type AlterADDResp struct {
	TableName string
}

type AppCenterAPI

type AppCenterAPI interface {
	CheckIsAdmin(ctx context.Context, appID, userID string, isSuper bool) (*CheckAppAdminResp, error)
}

AppCenterAPI 应用壳管理对外接口

func NewAppCenterAPI

func NewAppCenterAPI(conf *config.Config) AppCenterAPI

NewAppCenterAPI 生成对象

func NewAppCenterMock

func NewAppCenterMock() AppCenterAPI

type AppCenterMock

type AppCenterMock struct {
	mock.Mock
}

func (AppCenterMock) CheckIsAdmin

func (a AppCenterMock) CheckIsAdmin(ctx context.Context, appID, userID string, isSuper bool) (*CheckAppAdminResp, error)

type CheckAppAdminResp

type CheckAppAdminResp struct {
	IsAdmin bool
}

CheckAppAdminResp CheckAppAdmin

type CreateTableResp

type CreateTableResp struct {
	TableName string
}

type DeleteNamespaceResp

type DeleteNamespaceResp struct {
}

type DeleteResp

type DeleteResp struct {
	SuccessCount int64 `json:"successCount"`
}

type Field

type Field struct {
	Title string
	Type  string
	Max   int64
}

type FindOptions

type FindOptions struct {
	Page int64    `json:"page"`
	Size int64    `json:"size"`
	Sort []string `json:"sort"`
}

type FormAPI

type FormAPI struct {
	// contains filtered or unexported fields
}

func NewFormAPI

func NewFormAPI(config *config.Config) (*FormAPI, error)

func (*FormAPI) Delete

func (f *FormAPI) Delete(ctx context.Context, formReq *FormReq) (*DeleteResp, error)

func (*FormAPI) Get

func (f *FormAPI) Get(ctx context.Context, formReq *FormReq) (*GetResp, error)

func (*FormAPI) Insert

func (f *FormAPI) Insert(ctx context.Context, formReq *FormReq) (*InsertResp, error)

func (*FormAPI) Search

func (f *FormAPI) Search(ctx context.Context, formReq *FormReq) (*SearchResp, error)

func (*FormAPI) Update

func (f *FormAPI) Update(ctx context.Context, formReq *FormReq) (*UpdateResp, error)

type FormDDLAPI

type FormDDLAPI struct {
	// contains filtered or unexported fields
}

func NewFormDDLAPI

func NewFormDDLAPI(config *config.Config) (*FormDDLAPI, error)

func (*FormDDLAPI) AlterADD

func (f *FormDDLAPI) AlterADD(ctx context.Context, tableName string, field []*Field) (*AlterADDResp, error)

func (*FormDDLAPI) CreateTable

func (f *FormDDLAPI) CreateTable(ctx context.Context, tableName string, field []*Field) (*CreateTableResp, error)

func (*FormDDLAPI) Index

func (f *FormDDLAPI) Index(ctx context.Context, tableID, fieldName, indexName string) (*IndexResp, error)

type FormReq

type FormReq struct {
	FindOptions
	DslQuery interface{}
	Entity   interface{}
	TableID  string
}

type GetResp

type GetResp struct {
	Entity map[string]interface{} `json:"entity"`
}

type IndexResp

type IndexResp struct {
	IndexName string
}

type InsertResp

type InsertResp struct {
	SuccessCount int64 `json:"successCount"`
}

type PolyAPI

type PolyAPI interface {
	RegSwagger(ctx context.Context, host, swag, appID, tableID, tableName string) (*RegSwaggerResp, error)
	DeleteNamespace(ctx context.Context, appID, tableID string) (*DeleteNamespaceResp, error)
}

PolyAPI PolyAPI

func NewPolyAPI

func NewPolyAPI(conf *config.Config) PolyAPI

NewPolyAPI 生成编排对象

type RegSwaggerResp

type RegSwaggerResp struct {
}

RegSwaggerResp RegSwaggerResp

type SearchResp

type SearchResp struct {
	Entities []map[string]interface{} `json:"entities"`
	Total    int64                    `json:"total"`
}

type StructorReq

type StructorReq struct {
	FindOptions
	TableID string
	Dsl     *anypb.Any
	Entity  *anypb.Any
}

type UpdateResp

type UpdateResp struct {
	SuccessCount int64 `json:"successCount"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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