Documentation ¶
Index ¶
- func GetAllHeaders(ctx context.Context) metadata.MD
- func GetHeader(ctx context.Context, key string) string
- func GetIdentity(ctx context.Context) *pb.IdentityInfo
- func GetInParamByKey(ctx context.Context, key string) interface{}
- func GetOrgID(ctx context.Context) string
- func GetScenarioAndCompNameFromProviderKey(providerKey string) (scenario, compName, instanceName string, err error)
- func GetURLQuery(sdk *cptype.SDK, resultStructPtr interface{}) error
- func GetUserID(ctx context.Context) string
- func I18n(ctx context.Context, key string, args ...interface{}) string
- func Language(ctx context.Context) i18n.LanguageCodes
- func MakeCompURLQueryKey(compName string) string
- func MakeComponentProviderName(scenario, compType string) string
- func MustConvertProps(props interface{}) cptype.ComponentProps
- func MustFlatMapMeta(input interface{}, removeMetaAfterFlat bool)
- func MustGetScenarioAndCompNameFromProviderKey(providerKey string) (scenario, compName, instanceName string)
- func MustGetURLQuery(sdk *cptype.SDK, resultStructPtr interface{})
- func MustObjJSONTransfer(src interface{}, dst interface{}) interface{}
- func NewExtra(inputPtr interface{}) cptype.Extra
- func ObjJSONTransfer(src interface{}, dst interface{}) error
- func SDK(ctx context.Context) (sdk *cptype.SDK)
- func SetURLQuery(sdk *cptype.SDK, data interface{})
- type OperationBuilder
- func (b *OperationBuilder) Build() cptype.Operation
- func (b *OperationBuilder) WithAsync(async bool) *OperationBuilder
- func (b *OperationBuilder) WithConfirmTip(confirmTip string) *OperationBuilder
- func (b *OperationBuilder) WithDisable(disable bool, tip string) *OperationBuilder
- func (b *OperationBuilder) WithServerDataPtr(inputPtr interface{}) *OperationBuilder
- func (b *OperationBuilder) WithSkipRender(skipRender bool) *OperationBuilder
- func (b *OperationBuilder) WithText(text string) *OperationBuilder
- func (b *OperationBuilder) WithTip(tip string) *OperationBuilder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetAllHeaders ¶
GetAllHeaders get all headers from ctx.
func GetIdentity ¶
func GetIdentity(ctx context.Context) *pb.IdentityInfo
GetIdentity get identity from ctx.
func GetInParamByKey ¶
GetInParamByKey return cp inParam by key for easy use.
func GetScenarioAndCompNameFromProviderKey ¶
func GetScenarioAndCompNameFromProviderKey(providerKey string) (scenario, compName, instanceName string, err error)
GetScenarioAndCompNameFromProviderKey .
func GetURLQuery ¶
GetURLQuery get component's url query and parse to `resultStructPtr`.
func MakeCompURLQueryKey ¶
MakeCompURLQueryKey make url query key for component.
func MakeComponentProviderName ¶
MakeComponentProviderName .
func MustConvertProps ¶
func MustConvertProps(props interface{}) cptype.ComponentProps
MustConvertProps .
func MustFlatMapMeta ¶
func MustFlatMapMeta(input interface{}, removeMetaAfterFlat bool)
MustFlatMapMeta .
func MustGetScenarioAndCompNameFromProviderKey ¶
func MustGetScenarioAndCompNameFromProviderKey(providerKey string) (scenario, compName, instanceName string)
MustGetScenarioAndCompNameFromProviderKey .
func MustGetURLQuery ¶
MustGetURLQuery must GetURLQuery.
func MustObjJSONTransfer ¶
func MustObjJSONTransfer(src interface{}, dst interface{}) interface{}
MustObjJSONTransfer .
func ObjJSONTransfer ¶
func ObjJSONTransfer(src interface{}, dst interface{}) error
ObjJSONTransfer transfer from src to dst using json.
func SetURLQuery ¶
SetURLQuery set data to url query.
Types ¶
type OperationBuilder ¶
OperationBuilder .
func (*OperationBuilder) WithAsync ¶
func (b *OperationBuilder) WithAsync(async bool) *OperationBuilder
WithAsync .
func (*OperationBuilder) WithConfirmTip ¶
func (b *OperationBuilder) WithConfirmTip(confirmTip string) *OperationBuilder
WithConfirmTip .
func (*OperationBuilder) WithDisable ¶
func (b *OperationBuilder) WithDisable(disable bool, tip string) *OperationBuilder
WithDisable .
func (*OperationBuilder) WithServerDataPtr ¶
func (b *OperationBuilder) WithServerDataPtr(inputPtr interface{}) *OperationBuilder
WithServerDataPtr .
func (*OperationBuilder) WithSkipRender ¶
func (b *OperationBuilder) WithSkipRender(skipRender bool) *OperationBuilder
WithSkipRender .
func (*OperationBuilder) WithText ¶
func (b *OperationBuilder) WithText(text string) *OperationBuilder
WithText .
func (*OperationBuilder) WithTip ¶
func (b *OperationBuilder) WithTip(tip string) *OperationBuilder
WithTip .