structs

package
v0.0.26-beta.3 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// TaskStatusInProcess 等待审批中
	TaskStatusInProcess = "in_process"
	// TaskStatusCompleted 任务完成
	TaskStatusCompleted = "completed"
	// TaskStatusCanceled 任务取消
	TaskStatusCanceled = "canceled"
	// TaskStatusFailed 任务失败
	TaskStatusFailed = "failed"
	// TaskStatusAutoEnd 自动结束
	TaskStatusAutoEnd = "auto_end"
	// TaskStatusAgreed 用户通过
	TaskStatusAgreed = "agreed"
	// TaskStatusRejected 用户拒绝
	TaskStatusRejected = "rejected"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AppAccessToken added in v0.0.23

type AppAccessToken struct {
	Expire         int64  `json:"expire"`
	AppAccessToken string `json:"appAccessToken"`
	AppID          string `json:"appId"`
}

type AppCtx

type AppCtx struct {
	Mode       AppMode
	Env        constants.PlatformEnvType
	Credential *cHttp.AppCredential
}

func (*AppCtx) GetEnv

func (a *AppCtx) GetEnv() constants.PlatformEnvType

func (*AppCtx) IsOpenSDK

func (a *AppCtx) IsOpenSDK() bool

type AppInfo added in v0.0.22

type AppInfo = cStructs.AppInfo

type AppMode

type AppMode int
const (
	AppModeOpenSDK AppMode = iota + 1
	AppModeFaaSSDK
)

type AsyncTaskResult

type AsyncTaskResult struct {
	TaskID int64 `json:"taskID"`
}

type Attachment

type Attachment struct {
	ID       string `json:"id"`
	MimeType string `json:"mime_type"`
	Name     string `json:"name"`
	Size     int64  `json:"size"`
	Token    string `json:"token"`
}

type Avatar

type Avatar struct {
	ImageID        string `json:"imageId"`
	PreviewImageID string `json:"previewImageId"`
}

type AvatarImages

type AvatarImages map[string]string

type AvatarModel

type AvatarModel struct {
	Source  string        `json:"source"`
	Image   *AvatarImages `json:"image"`
	Color   string        `json:"color"`
	ColorID string        `json:"color_id" mapstructure:"color_id"`
	Content interface{}   `json:"content"`
}

type BatchCreateRecord

type BatchCreateRecord struct {
	RecordIDs []int64 `json:"record_ids"`
}

type BatchCreateRecordV2

type BatchCreateRecordV2 struct {
	RecordIDs []int64 `json:"_ids"`
}

type BatchResult added in v0.0.22

type BatchResult struct {
	Code string            `json:"code"`
	Msg  string            `json:"msg"`
	Data []BatchResultData `json:"data"`
}

func (*BatchResult) HasError added in v0.0.22

func (b *BatchResult) HasError() bool

type BatchResultData added in v0.0.22

type BatchResultData struct {
	Success bool                   `json:"success"`
	ID      int64                  `json:"_id"`
	Errors  []BatchResultDataError `json:"errors"`
}

type BatchResultDataError added in v0.0.22

type BatchResultDataError struct {
	Code string `json:"code"`
}

type Criterion

type Criterion struct {
	Conditions []Expression `json:"conditions"`
	Logic      string       `json:"logic"`
}

type DisplayFields

type DisplayFields []LookupResponse

type EventInfo added in v0.0.22

type EventInfo = cStructs.EventInfo

type ExecuteOptions

type ExecuteOptions struct {
	// 流程入参
	Params map[string]interface{} `json:"params"`
}

type ExecutionInfo

type ExecutionInfo struct {
	Status  ExecutionStatus        `json:"status"`
	Data    map[string]interface{} `json:"data"`
	ErrCode *string                `json:"errCode"`
	ErrMsg  *string                `json:"errMsg"`
}

type ExecutionStatus

type ExecutionStatus string
const (
	ExecutionStatusWait      ExecutionStatus = "wait"
	ExecutionStatusInProcess ExecutionStatus = "in_process"
	ExecutionStatusEnd       ExecutionStatus = "end"
	ExecutionStatusRejected  ExecutionStatus = "rejected"
	ExecutionStatusCanceled  ExecutionStatus = "canceled"
	ExecutionStatusFailed    ExecutionStatus = "failed"
	ExecutionStatusAgreed    ExecutionStatus = "agreed"
)

type Expression

type Expression struct {
	Index    int64           `json:"index"`
	Left     ExpressionField `json:"left"`
	Operator string          `json:"operator"`
	Right    ExpressionField `json:"right"`
}

type ExpressionField

type ExpressionField struct {
	Type     string          `json:"type"`
	Settings json.RawMessage `json:"settings"`

	DisplayName        []string `json:"displayName"`
	FieldsDisplayNames []string `json:"fieldsDisplayNames"`
	DisplayLabel       []string `json:"displayLabel,omitempty"`
	// contains filtered or unexported fields
}

type ExtractFilterRecord

type ExtractFilterRecord struct {
	Type  string `json:"type"`
	Index int64  `json:"index"`
}

type Field

type Field struct {
	ID         int64        `json:"id"`
	TenantID   int64        `json:"tenant_id"`
	ObjectID   int64        `json:"object_id"`
	APIName    string       `json:"api_name"`
	APIAlias   string       `json:"api_alias,omitempty"`
	Label      I18ns        `json:"label"`
	Required   bool         `json:"required"`
	UniqueType int          `json:"unique_type"`
	Type       *TypeSetting `json:"type"`
}

type FieldDefinition

type FieldDefinition struct {
	ID             int64          `json:"id" yaml:"id"`
	TenantID       int64          `json:"tenant_id"`
	Column         int64          `json:"column" yaml:"column"`
	Label          I18ns          `json:"label"`
	APIName        string         `json:"api_name"`
	ApiAlias       string         `json:"api_alias"`
	Namespace      string         `json:"namespace"`
	Desc           I18ns          `json:"description"`
	ObjectID       int64          `json:"object_id"`
	ObjectAPIName  string         `json:"object_api_name"`
	ObjectApiAlias string         `json:"object_api_alias"`
	Type           *TypeSetting   `json:"type"`
	Required       bool           `json:"required"`
	UniqueType     int            `json:"unique_type"`
	Domain         int64          `json:"domain"`
	CreatedAt      int64          `json:"created_at" `
	CreatedBy      LazyUserLookup `json:"created_by" `
	UpdatedAt      int64          `json:"updated_at"`
	UpdatedBy      LazyUserLookup `json:"updated_by"`

	//字段是否有查询权限,0无查看权限,1有查看权限,nil时默认有查看权限
	FieldPermission int64 `json:"field_permission,omitempty" mapstructure:"field_permission"`
}

type FileUploadResult

type FileUploadResult struct {
	FileID string `json:"fileId"`
	Type   string `json:"type"`
	Name   string `json:"name"`
	Size   int    `json:"size"`
}

type FindStreamData added in v0.0.23

type FindStreamData struct {
	Records      interface{} `json:"records"`
	UnauthFields [][]string  `json:"unauthFields"`
}

type FindStreamParam added in v0.0.23

type FindStreamParam struct {
	IDGetter func(record interface{}) (id int64, err error)
	Handler  func(ctx context.Context, data *FindStreamData) (err error)
}

type FlowExecuteResult

type FlowExecuteResult struct {
	ExecutionID int64                  `json:"executionId"`
	Status      ExecutionStatus        `json:"status"`
	Data        map[string]interface{} `json:"data"`
	ErrCode     *string                `json:"errCode"`
	ErrMsg      *string                `json:"errMsg"`
}

type FlowUser

type FlowUser struct {
	// aPaaS UserID
	UserID int64 `json:"userId"`
	// Lark OpenID
	FeishuOpenID string `json:"feishuOpenId"`
	// 用户名
	UserName Multilingual `json:"userName"`
}

type FlowUserAvatar

type FlowUserAvatar struct {
	// 用户头像 URL
	URL string `json:"url"`
}

type FuzzySearch added in v0.0.16

type FuzzySearch struct {
	Keyword       string   `json:"keyword"`
	FieldAPINames []string `json:"fieldAPINames"`
}

type GetRecordsReqParam

type GetRecordsReqParam struct {
	Criterion                interface{}           `json:"criterion"`
	Order                    []*Order              `json:"order"`
	FieldApiNames            []string              `json:"field_api_names"`
	Offset                   int64                 `json:"offset"`
	Limit                    int64                 `json:"limit"`
	NeedTotalCount           bool                  `json:"need_total_count"`
	IgnoreBackLookupField    bool                  `json:"ignore_back_lookup_field"`
	NeedFilterUserPermission bool                  `json:"need_filter_user_permission"`
	FuzzySearch              *FuzzySearch          `json:"fuzzySearch"`
	ProcessAuthFieldType     *ProcessAuthFieldType `json:"process_auth_field_type"`
}

type GetRecordsReqParamV2

type GetRecordsReqParamV2 struct {
	Limit       int64         `json:"limit"`
	Offset      int64         `json:"offset"`
	Fields      []string      `json:"fields"`
	QuickSearch string        `json:"quickSearch"`
	Filter      []interface{} `json:"filter"`
	Sort        []*Order      `json:"sort"`
	Count       *bool         `json:"count"`
}

type GlobalConfigResult

type GlobalConfigResult struct {
	Configs []struct {
		BizType string `json:"biz_type"`
		Extra   struct {
			AccessSpecifier string `json:"access_specifier"`
		} `json:"extra"`
		Key       string `json:"key"`
		NameSpace string `json:"name_space"`
		Value     string `json:"value"`
	} `json:"configs"`
	Total int `json:"total"`
}

type I18n

type I18n struct {
	LanguageCode int64  `mapstructure:"language_code" json:"language_code" yaml:"LanguageCode"`
	Text         string `json:"text" yaml:"Text"`
}

type I18ns

type I18ns []I18n

type LazyUserLookup

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

type Locale

type Locale = UserSetting

type LookupResponse

type LookupResponse struct {
	ID        int64  `json:"id"`
	Name      string `json:"name"`
	IsDeleted bool   `json:"is_deleted"`
}

type LookupWithAPIName

type LookupWithAPIName struct {
	ID        int64  `json:"id"`
	Name      string `json:"name"`
	IsDeleted bool   `json:"is_deleted"`
	APIName   string `json:"api_name"`
}

type LookupWithAvatar

type LookupWithAvatar struct {
	ID        int64        `json:"id"`
	Name      string       `json:"name"`
	I18nName  I18ns        `json:"i18n_name,omitempty"`
	Avatar    *AvatarModel `json:"avatar,omitempty"`
	IsDeleted bool         `json:"is_deleted"`
}

type MessageBody

type MessageBody struct {
	Icon        string                `json:"icon"` // "success" | "error" | "progress" | "info"
	Percent     int64                 `json:"percent"`
	TargetUsers []int64               `json:"targetUsers"`
	Title       *faassdk.Multilingual `json:"title"`
	Detail      *faassdk.Multilingual `json:"detail"`
}

type MessageParam

type MessageParam struct {
	NotifyModelKey     string                 `json:"NotifyModelKey"`
	ReceiverIDs        []int64                `json:"ReceiverIDs"`
	ParamsRawData      interface{}            `json:"ParamsRawData"`
	Percent            interface{}            `json:"Percent"`
	ModelKeySearchData map[string]interface{} `json:"ModelKeySearchData"`
}

type MetaSort

type MetaSort struct {
	FieldAPIName string `json:"field"`
	Type         string `json:"type"`
	Direction    string `json:"direction"`
}

type Multilingual

type Multilingual struct {
	En string `json:"en_US,omitempty"`
	Zh string `json:"zh_CN,omitempty"`
}

type NestedAttachmentSetting

type NestedAttachmentSetting struct {
	// property
	Multiple bool `json:"multiple"`

	// resolve
	AnyType   bool     `json:"any_type,omitempty"`
	MimeTypes []string `json:"mime_types"`
}

type NestedAutoNumberSetting

type NestedAutoNumberSetting struct {
	// resolve
	GenerationMethod    string `json:"generation_method"`
	Digits              int64  `json:"digits"`
	Prefix              string `json:"prefix"`
	Suffix              string `json:"suffix"`
	GenerationSettingID int64  `json:"generation_setting_id"`
	// display
	Placeholder I18ns `json:"placeholder"`
}

type NestedAvatarSetting

type NestedAvatarSetting struct {
	// display
	DisplayStyle string `json:"display_style"`
}

type NestedBackLookupSetting

type NestedBackLookupSetting struct {
	// property
	IsArray                bool   `json:"is_array"`
	IsInherit              bool   `json:"is_inherit"`
	RelatedToObjectID      int64  `json:"related_to_object_id"`
	RelatedToObjectAPIName string `json:"related_to_object_api_name"`
	RelatedToFieldID       int64  `json:"related_to_field_id"`
	RelatedToFieldAPIName  string `json:"related_to_field_api_name"`

	// display
	RelatedToObjectName string `json:"related_to_object_name"`
	RelatedToFieldName  string `json:"related_to_field_name"`
}

type NestedBooleanSetting

type NestedBooleanSetting struct {
	DefaultValue bool `json:"default_value"`

	Description4True  I18ns `json:"description_if_true"`
	Description4False I18ns `json:"description_if_false"`
}

type NestedCompositeSetting

type NestedCompositeSetting struct {
	// property
	Multiple         bool   `json:"multiple"`
	RelatedToID      int64  `json:"related_to_id,omitempty"`
	RelatedToAPIName string `json:"related_to_api_name,omitempty"`
	IsExtract        bool   `json:"is_extract,omitempty"`
	RelationID       int64  `json:"relation_id,omitempty"`

	// ExtractCompositeSetting
	Filter                *Criterion           `json:"filter,omitempty"`
	Sort                  *Sorts               `json:"sort,omitempty"`
	FilterRecord          *ExtractFilterRecord `json:"filter_record,omitempty"`
	RelatedToFieldID      int64                `json:"related_to_field_id,omitempty"`
	RelatedToFieldAPIName string               `json:"related_to_field_api_name,omitempty"`

	// display
	RelatedToLabel *I18ns `json:"related_to_label,omitempty"`

	// not in cache
	RelatedToFields []*Field `json:"related_to_fields,omitempty"`
}

type NestedConditionSetting

type NestedConditionSetting struct {
	// property
	TargetObject LookupWithAPIName `json:"target_object"`

	LeftFilterFields  interface{} `json:"left_filter_fields"`
	RightFilterFields interface{} `json:"right_filter_fields"`
}

type NestedDateSetting

type NestedDateSetting struct {
	// display
	Placeholder I18ns `json:"placeholder"`
}

type NestedDatetimeSetting

type NestedDatetimeSetting struct {
	// display
	Placeholder I18ns `json:"placeholder"`
}

type NestedEmailSetting

type NestedEmailSetting struct {
	// display
	Placeholder I18ns `json:"placeholder"`
}

type NestedEncryptNumberSetting

type NestedEncryptNumberSetting struct {
	// property
	DisplayAsPercentage bool `json:"display_as_percentage"`

	// display
	DecimalPlaces int `json:"decimal_places"`
}

type NestedEnumSetting

type NestedEnumSetting struct {
	IsArray               bool                  `json:"is_array"`
	OptionType            string                `json:"option_type"`
	Options               *Options              `json:"options"`
	RelatedToGlobalOption RelatedToGlobalOption `json:"related_to_global_option"`
}

type NestedFloatSetting

type NestedFloatSetting struct {
	// property
	DisplayAsPercentage bool `json:"display_as_percentage"`

	// display
	DecimalPlaces int   `json:"decimal_places"`
	Placeholder   I18ns `json:"placeholder"`
}

type NestedFormulaSetting

type NestedFormulaSetting struct {
	// property
	MaxLength            int64  `json:"max_length"`
	ReturnType           string `json:"return_type"`
	FormulaVersion       int64  `json:"formula_version"`
	ProcessMode          string `json:"process_mode"`
	HasRefEncryptedField bool   `json:"has_ref_encrypted_field"`

	// resolve
	RelatedToConst string            `json:"ref_to_const"`
	RefRecords     I18ns             `json:"ref_record_ids"`
	RefFieldType   map[string]string `json:"ref_field_type"`
	Formulas       I18ns             `json:"formulas"`
	RefAPINames    I18ns             `json:"ref_api_names"`

	// display
	ReturnFieldMeta map[string]interface{} `json:"return_field_meta"`
	BridgeAPIName   []interface{}          `json:"bridge_api_names"`
}

type NestedLookupSetting

type NestedLookupSetting struct {
	// property
	IsArray                  bool   `json:"is_array,omitempty"`
	IsHierarchy              bool   `json:"is_hierarchy,omitempty"`
	TargetIsHierarchy        bool   `json:"target_is_hierarchy"`
	ReferencedObjectID       int64  `json:"referenced_object_id"`
	ReferencedObjectAPIName  string `json:"referenced_object_api_name,omitempty"`
	ReferencedObjectAPIAlias string `json:"referenced_object_api_alias,omitempty"`
	RelationID               int64  `json:"relation_id,omitempty"`

	// resolve
	DisplayAsTree bool          `json:"display_as_tree,omitempty"`
	DisplayFields DisplayFields `json:"display_fields,omitempty"`
	DisplayOrder  Sorts         `json:"display_order,omitempty"`

	// display
	DisplayStyle          string `json:"display_style,omitempty"`
	ReferencedObjectLabel I18ns  `json:"referenced_object_label,omitempty"`
}

type NestedMultilingualSetting

type NestedMultilingualSetting struct {
	// resolve
	MaxLength int64 `json:"max_length"`

	// display
	Multiline   bool  `json:"multiline"`
	Placeholder I18ns `json:"placeholder"`
}

type NestedPhoneSetting

type NestedPhoneSetting struct {
	// display
	Placeholder I18ns `json:"placeholder"`
}

type NestedReferenceFieldSetting

type NestedReferenceFieldSetting struct {
	// property
	CurrentLookupFieldID          int64  `json:"current_lookup_field_id"`
	CurrentLookupFieldAPIName     string `json:"current_lookup_field_api_name,omitempty"`
	TargetReferenceFieldID        int64  `json:"target_reference_field_id"`
	TargetReferenceFieldAPIName   string `json:"target_reference_field_api_name,omitempty"`
	TargetReferencedObjectID      int64  `json:"target_reference_object_id,omitempty"`
	TargetReferencedObjectAPIName string `json:"target_referenced_object_api_name,omitempty"`

	// display
	TargetReferenceField *Field `json:"target_reference_field,omitempty"`

	// 支持analytics接入专表专用提供
	TargetRefFieldTblDesc *RefFieldTableDescribe `json:"target_ref_field_tbl_desc,omitempty"`
}

type NestedRichTextSetting

type NestedRichTextSetting struct {
	// resolve
	MaxLength int `json:"max_length"`
}

type NestedTextSetting

type NestedTextSetting struct {
	// resolve
	MaxLength int64 `json:"max_length"`

	// display
	Multiline   bool  `json:"multiline"`
	Placeholder I18ns `json:"placeholder"`
}

type ObjFields

type ObjFields struct {
	Fields []*Field `json:"fields"`
}

type Option

type Option struct {
	APINameID string `json:"id"` // 输出标记 id
	Active    int64  `json:"active"`
	APIAlias  string `json:"api_alias,omitempty"` // rpc 调用时传递的 ApiAlias
	APIName   string `json:"api_name,omitempty"`  // 将 ApiAlias 输出
	// display
	ColorID     string `json:"color_id"`
	Label       I18ns  `json:"name"`
	Description I18ns  `json:"description"`
}

type Options

type Options []Option

type OqlResultSet

type OqlResultSet struct {
	Rows interface{} `json:"rows"`
}

type Order

type Order struct {
	Field     string `json:"field"`     // 字段的 apiName
	Direction string `json:"direction"` // 排序方向,取值为:asc 或 desc
	Type      string `json:"type"`      // 传空串即可,不传底层报错
}

type ProcessAuthFieldType added in v0.0.28

type ProcessAuthFieldType int64
const (
	ProcessAuthFieldType_Default ProcessAuthFieldType = iota
	ProcessAuthFieldType_BothResult
	ProcessAuthFieldType_SliceResult
	ProcessAuthFieldType_MapResult
)

type RPCCliConf

type RPCCliConf struct {
	Psm         string        `yaml:"Psm" json:"Psm"`
	DebugAddr   string        `yaml:"DebugAddr" json:"DebugAddr"`
	Cluster     string        `yaml:"Cluster" json:"Cluster"`
	IDC         string        `yaml:"IDC" json:"IDC"`
	Timeout     time.Duration `yaml:"Timeout" json:"Timeout"`
	ConnTimeout time.Duration `yaml:"ConnTimeout" json:"ConnTimeout"`
}

type RecordID

type RecordID struct {
	ID int64 `json:"_id"`
}

type RecordsResult

type RecordsResult struct {
	Records []interface{} `json:"records"`
	Total   int64         `json:"total"`
}

type RefFieldTableDescribe

type RefFieldTableDescribe struct {
	ColumnName string `json:"column_name"`

	ObjectTblName     string `json:"object_tbl_name"`
	ObjectTblI18nName string `json:"object_tbl_i18n_name"`
}

type RelatedToGlobalOption

type RelatedToGlobalOption struct {
	ID      int64  `json:"id"`
	Name    string `json:"name"`
	APIName string `json:"apiName"`
}

type RevokeOptions

type RevokeOptions struct {
	Reason Multilingual `json:"reason"`
}

type Sorts

type Sorts []*MetaSort

type TaskInfo

type TaskInfo struct {
	TaskID int64 `json:"taskId"`
	// 任务名称
	Label Multilingual `json:"label"`
	// 任务类型
	TaskType string `json:"taskType"`
	// 任务状态
	TaskStatus TaskStatus `json:"taskStatus"`
	// 任务意见列表
	OpinionList []*TaskOpinion `json:"opinionList"`
	// 指派人列表
	AssigneeList []*FlowUser `json:"assigneeList"`
	// 节点开始时间
	StartedTime int64 `json:"startedTime"`
	// 节点完成时间
	CompletedTime *int64 `json:"completedTime"`
}

type TaskOpinion

type TaskOpinion struct {
	User FlowUser `json:"user"`
	// 意见结果
	OpinionResult string `json:"opinionResult"`
	// 提交时间
	SubmitTime int64 `json:"submitTime"`
	// 意见内容
	OpinionContent *string `json:"opinionContent"`
}

type TaskStatus

type TaskStatus string

type TaskType

type TaskType string
const (
	Form     TaskType = "form"
	Approval TaskType = "approval"
	CC       TaskType = "CC"
)

type TenantAccessToken added in v0.0.23

type TenantAccessToken struct {
	Expire            int64  `json:"expire"`
	TenantAccessToken string `json:"tenantAccessToken"`
	AppID             string `json:"appId"`
}

type TenantInfo added in v0.0.22

type TenantInfo = cStructs.Tenant

type TimeZone

type TimeZone struct {
	Location string `json:"location"`
	Offset   string `json:"offset"`
}

type TransactionOperation

type TransactionOperation struct {
	OperationType constants.OperationType `json:"operationType"`
	ObjectAPIName string                  `json:"objectApiName"`
	Input         string                  `json:"input"`
}

type TransactionRecordID

type TransactionRecordID struct {
	ID interface{} `json:"_id"`
}

type TypeSetting

type TypeSetting struct {
	Name     string      `json:"name"`
	Settings interface{} `json:"settings"`
}

type UserSetting

type UserSetting struct {
	UserID   int64    `json:"userId"`
	Language string   `json:"language"`
	Timezone TimeZone `json:"timezone"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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