Versions in this module Expand all Collapse all v0 v0.0.1 Mar 26, 2026 Changes in this version + const Version + var ApaasError = ErrorCode + var NoPermissionError = ErrorCode + var ParamsError = ErrorCode + var SysError = ErrorCode + var TimeoutError = ErrorCode + func AppBatchCreateReturnRecordID[T any](ctx context.Context, app *application.Application, objName string, records []T) (ids []int64, err error) + func AppBatchCreate[T any](ctx context.Context, app *application.Application, objName string, records []T) error + func AppBatchDelete(ctx context.Context, app *application.Application, objName string, ids []int64) error + func AppBatchDeleteByCond(ctx context.Context, app *application.Application, objName string, ...) error + func AppBatchQuery[T BaseLookup](ctx context.Context, app *application.Application, options ...q.Option) ([]*T, error) + func AppBatchUpdate(ctx context.Context, app *application.Application, objName string, ...) error + func BatchCreateReturnRecordID[T any](ctx context.Context, objName string, records []T) (ids []int64, err error) + func BatchCreate[T any](ctx context.Context, objName string, records []T) error + func BatchDelete(ctx context.Context, objName string, ids []int64) error + func BatchDeleteByCond(ctx context.Context, objName string, cond interface{}) error + func BatchQuery[T BaseLookup](ctx context.Context, options ...q.Option) ([]*T, error) + func BatchUpdate(ctx context.Context, objName string, recordMap map[int64]interface{}) error + func ChunkMap[K comparable, V any](m map[K]V, limit int) []map[K]V + func ChunkSlice[T any](slice []T, limit int) [][]T + func CompressImage(imgBytes []byte, quality int) ([]byte, error) + func GetENFromMultilingual(ml faassdk.Multilingual) string + func GetObjectAllFields(ctx context.Context, objName string) ([]string, error) + func GetStructJsonTags(rts ...reflect.Type) (tags []string) + func GetStructTags(tagName string, rts ...reflect.Type) (tags []string) + func GetZHFromMultilingual(ml faassdk.Multilingual) string + func Init() + func IsDev(ctx context.Context) (bool, error) + func SetMultilingual(m Multilingual) faassdk.Multilingual + func ToString(data any) string + func UnmarshalFromFlowVariables(variables map[string]structs.CfVariable, key string, dist any) error + type BaseLookup interface + GetRecordId func() int64 + type ErrorCode struct + Code int + Message string + type FlowLookup struct + I18nName *faassdk.Multilingual + ID int64 + Name string + func (l FlowLookup) GetRecordId() int64 + type IDLookup struct + ID int64 + func (l IDLookup) GetRecordId() int64 + type Lookup struct + CreatedAt int64 + ID int64 + Name *faassdk.Multilingual + UpdatedAt int64 + func (l Lookup) GetRecordId() int64 + type Multilingual struct + EN string + ZH string + type NameLookup struct + ID int64 + Name *faassdk.Multilingual + func (l NameLookup) GetRecordId() int64 + type OpenAPILabelOption struct + ApiName string + Label Multilingual + type OpenAPIOption struct + ApiName string + type Result struct + Code int + Data interface{} + Message string + RequestId string + func NewResult() *Result + func (r *Result) Error(ec ErrorCode) (*Result, error) + func (r *Result) ErrorWithMessage(message string) (*Result, error) + func (r *Result) FailWithMessage(data interface{}, message string) (*Result, error) + func (r *Result) Success(data interface{}) (*Result, error) + func (r *Result) SuccessWithMessage(data interface{}, message string) (*Result, error) + type TimeLookup struct + CreatedAt int64 + ID int64 + UpdatedAt int64 + func (l TimeLookup) GetRecordId() int64