client

package
v0.0.0-...-36f034f Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2023 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Get

func Get(ctx context.Context, client *http.Client, urls string, entity interface{}, values url.Values) error

Get Get

Types

type AdminDepartment

type AdminDepartment struct {
	ID             string `json:"id,omitempty"`
	DepartmentName string `json:"departmentName,omitempty"`
}

AdminDepartment AdminDepartment

type AppCenter

type AppCenter interface {
	ExportAppInfo(ctx context.Context, appID string) (*ExportAppInfoResp, error)
	CheckVersion(ctx context.Context, version string) error
	SuccessImport(ctx context.Context, appID string) error
	FailImport(ctx context.Context, appID string) error
	CreateTemplate(ctx context.Context, req *CreateTemplateReq) (*CreateTemplateResp, error)
	GetTemplateByID(ctx context.Context, id string) (*GetTemplateByIDResp, error)
	FinishTemplate(ctx context.Context, id, path string) (*FinishTemplateResp, error)
	DeleteTemplate(ctx context.Context, id string) (*DeleteTemplateResp, error)
	Close()
}

AppCenter AppCenter

func NewAppCenter

func NewAppCenter(conf *config.Config) AppCenter

NewAppCenter AppCenterClient

type CreateReq

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

CreateReq CreateReq

type CreateResp

type CreateResp struct {
	Entity     interface{} `json:"entity"`
	ErrorCount int64       `json:"errorCount"`
}

CreateResp CreateResp

type CreateTemplateReq

type CreateTemplateReq struct {
	Name    string `json:"name"`
	AppIcon string `json:"appIcon"`
	AppID   string `json:"appID"`
	Version string `json:"version"`
	GroupID string `json:"groupID"`
	Path    string `json:"path"`
}

CreateTemplateReq CreateTemplateReq

type CreateTemplateResp

type CreateTemplateResp struct {
	ID      string `json:"id"`
	Name    string `json:"name"`
	Version string `json:"version"`
	AppIcon string `json:"appIcon"`
	AppID   string `json:"appID"`
	AppName string `json:"appName"`
	GroupID string `json:"groupID"`
	Status  int    `json:"status"`
}

CreateTemplateResp CreateTemplateResp

type DeleteTemplateResp

type DeleteTemplateResp struct {
}

DeleteTemplateResp DeleteTemplateResp

type ExportAPIResp

type ExportAPIResp struct {
	Path string `json:"path"`
	Data string `json:"data"`
}

ExportAPIResp ExportAPIResp

type ExportAppInfoResp

type ExportAppInfoResp struct {
	AppID   string `json:"appID"`
	AppName string `json:"appName"`
	Version string `json:"version"`
}

ExportAppInfoResp ExportAppInfoResp

type ExportFlowResp

type ExportFlowResp struct {
	Jsons string `json:"data"`
}

ExportFlowResp ExportFlowResp

type ExportPermissionResp

type ExportPermissionResp struct {
	JSONs string `json:"jsons"`
}

ExportPermissionResp ExportPermissionResp

type ExportPersonaResp

type ExportPersonaResp struct {
	AppData []*KV `json:"AppData"`
}

ExportPersonaResp ExportPersonaResp

type ExportTableResp

type ExportTableResp struct {
	JSONs     string            `json:"exportJSON"`
	PageFiles map[string][]byte `json:"pageFiles"`
}

ExportTableResp ExportTableResp

type FindOptions

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

FindOptions page options

type FinishTemplateResp

type FinishTemplateResp struct {
}

FinishTemplateResp FinishTemplateResp

type Flow

type Flow interface {
	ExportFlow(ctx context.Context, appID string) (*ExportFlowResp, error)
	ImportFlow(ctx context.Context, appID, jsons string) (*ImportFlowResp, error)
	Close()
}

Flow Flow

func NewFlow

func NewFlow(conf *config.Config) Flow

NewFlow NewFlow

type FormAPI

type FormAPI interface {
	Search(ctx context.Context, options FindOptions, query interface{}, appID, tableID string) (*SearchResp, error)
	CreateBatch(ctx context.Context, appID, tableID string, req []*FormReq) (*CreateResp, error)
	Close()
}

FormAPI FormAPI

func NewFormAPI

func NewFormAPI(conf *config.Config) FormAPI

NewFormAPI NewFormAPI

type FormReq

type FormReq struct {
	FindOptions
	Query  interface{} `json:"query"`
	Entity interface{} `json:"entity"`
}

FormReq FormReq

type GetDepListResp

type GetDepListResp struct {
	PageSize    int                `json:"-"`
	TotalCount  int64              `json:"total_count"`
	TotalPage   int                `json:"-"`
	CurrentPage int                `json:"-"`
	StartIndex  int                `json:"-"`
	Data        []*AdminDepartment `json:"data"`
}

GetDepListResp GetDepListResp

type GetTableSchemaReq

type GetTableSchemaReq struct {
	TableID string `json:"tableID"`
}

GetTableSchemaReq GetTableSchemaReq

type GetTableSchemaResp

type GetTableSchemaResp struct {
	ID      string                 `json:"id"`
	TableID string                 `json:"tableID"`
	Schema  map[string]interface{} `json:"schema"`
	Config  map[string]interface{} `json:"config"`
}

GetTableSchemaResp GetTableSchemaResp

type GetTemplateByIDResp

type GetTemplateByIDResp struct {
	ID          string `json:"id"`
	Name        string `json:"name"`
	Version     string `json:"version"`
	AppIcon     string `json:"appIcon"`
	Path        string `json:"path"`
	AppID       string `json:"appID"`
	AppName     string `json:"appName"`
	GroupID     string `json:"groupID"`
	CreatedBy   string `json:"createdBy"`
	CreatedName string `json:"createdName"`
	CreatedTime int64  `json:"createdTime"`
	UpdatedBy   string `json:"updatedBy"`
	UpdatedName string `json:"updatedName"`
	UpdatedTime int64  `json:"updatedTime"`
	Status      int    `json:"status"`
}

GetTemplateByIDResp GetTemplateByIDResp

type GetUserListResp

type GetUserListResp struct {
	Total int64         `json:"total"`
	Users []*listVoResp `json:"users"`
}

GetUserListResp GetUserListResp

type ImportAPIResp

type ImportAPIResp struct {
}

ImportAPIResp ImportAPIResp

type ImportFlowResp

type ImportFlowResp struct {
}

ImportFlowResp ImportFlowResp

type ImportPermissionResp

type ImportPermissionResp struct {
}

ImportPermissionResp ImportPermissionResp

type ImportPersonaResp

type ImportPersonaResp struct {
}

ImportPersonaResp ImportPersonaResp

type ImportTableResp

type ImportTableResp struct {
	TableIDs map[string]string `json:"tableIDs"`
}

ImportTableResp ImportTableResp

type KV

type KV struct {
	Key   string `json:"key"`
	Value string `json:"value"`
}

KV persona format

type MessageAPI

type MessageAPI interface {
	SendMs(ctx context.Context, userID, uuID string, contents []byte) (*SendMsResp, error)
	Close()
}

MessageAPI MessageAPI

func NewMessage

func NewMessage(config client.Config) MessageAPI

NewMessage NewMessage

type OrgAPI

type OrgAPI interface {
	DepTree(ctx context.Context) (*TreeResp, error)
	GetUserList(ctx context.Context, userName string) (*GetUserListResp, error)
	Close()
}

OrgAPI OrgAPI

func NewOrgAPI

func NewOrgAPI(conf *config.Config) OrgAPI

NewOrgAPI NewOrgAPI

type Persona

type Persona interface {
	Import(ctx context.Context, appData []*KV) (*ImportPersonaResp, error)
	Export(ctx context.Context, appID string) (*ExportPersonaResp, error)
}

Persona Persona

func NewPersona

func NewPersona(conf *config.Config) Persona

NewPersona return a persona client

type PolyAPI

type PolyAPI interface {
	Close()
	ExportAPI(ctx context.Context, appID string) (*ExportAPIResp, error)
	ImportAPI(ctx context.Context, oldAppID, newAppID, data string) (*ImportAPIResp, error)
}

PolyAPI PolyAPI

func NewPolyAPI

func NewPolyAPI(conf *config.Config) PolyAPI

NewPolyAPI NewPolyAPI

type SearchResp

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

SearchResp SearchResp

type SendMsResp

type SendMsResp struct {
}

SendMsResp SendMsResp

type Structor

type Structor interface {
	ExportTable(ctx context.Context, appID string) (*ExportTableResp, error)
	ExportPermission(ctx context.Context, appID string) (*ExportPermissionResp, error)
	ImportTable(ctx context.Context, appID, oldAppID, jsons string, pageFiles map[string][]byte) (*ImportTableResp, error)
	ImportPermission(ctx context.Context, appID, jsons string, tableIDs map[string]string) (*ImportPermissionResp, error)
	Close()
}

Structor Structor

func NewStructor

func NewStructor(conf *config.Config) Structor

NewStructor NewStructor

type TableAPI

type TableAPI interface {
	HomeTableSchema(ctx context.Context, appID, tableID string) (*GetTableSchemaResp, error)
	Close()
}

TableAPI table Client interface

func NewTableAPI

func NewTableAPI(conf *config.Config) TableAPI

NewTableAPI return a table client

type TreeResp

type TreeResp struct {
	ID             string     `json:"id,omitempty"`
	DepartmentName string     `json:"name,omitempty"`
	Child          []TreeResp `json:"child"`
}

TreeResp 树形返回结构

Jump to

Keyboard shortcuts

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