Documentation ¶
Index ¶
- Constants
- Variables
- func DeleteAlias(cli bce.Client, args *DeleteAliasArgs) error
- func DeleteFunction(cli bce.Client, args *DeleteFunctionArgs) error
- func DeleteReservedConcurrentExecutions(cli bce.Client, args *DeleteReservedConcurrentExecutionsArgs) error
- func DeleteTrigger(cli bce.Client, args *DeleteTriggerArgs) error
- func SetReservedConcurrentExecutions(cli bce.Client, args *ReservedConcurrentExecutionsArgs) error
- type Alias
- type BosEventType
- type BosTriggerData
- type CDNEventType
- type CDNTriggerData
- type CFCEdgeTriggerData
- type CodeFile
- type CodeStorage
- type CreateAliasArgs
- type CreateAliasResult
- type CreateFunctionArgs
- type CreateFunctionResult
- type CreateTriggerArgs
- type CreateTriggerResult
- type CrontabTriggerData
- type DeleteAliasArgs
- type DeleteFunctionArgs
- type DeleteReservedConcurrentExecutionsArgs
- type DeleteTriggerArgs
- type Environment
- type Function
- type FunctionInfo
- type GetAliasArgs
- type GetAliasResult
- type GetFunctionArgs
- type GetFunctionConfigurationArgs
- type GetFunctionConfigurationResult
- type GetFunctionResult
- type HTTPMethod
- type HttpTriggerData
- type InvocationType
- type InvocationsArgs
- type InvocationsResult
- type ListAliasesArgs
- type ListAliasesResult
- type ListFunctionsArgs
- type ListFunctionsResult
- type ListTriggersArgs
- type ListTriggersResult
- type ListVersionsByFunctionArgs
- type ListVersionsByFunctionResult
- type LogType
- type Operation
- type PublishVersionArgs
- type PublishVersionResult
- type RelationInfo
- type ReservedConcurrentExecutionsArgs
- type SourceType
- type TriggerType
- type UpdateAliasArgs
- type UpdateAliasResult
- type UpdateFunctionCodeArgs
- type UpdateFunctionCodeResult
- type UpdateFunctionConfigurationArgs
- type UpdateFunctionConfigurationResult
- type UpdateTriggerArgs
- type UpdateTriggerResult
- type Validator
- type VpcConfig
Constants ¶
View Source
const ( AliasNameInvalid = "the alias name of %s must match " + RegularAliasName FunctionCodeInvalid = "the code of function is invalidate" VersionInvalid = "the version of function must match " + RegularVersion QualifierInvalid = "the qualifier is not the function's version or alias" PaginateInvalid = "the pagination must greater than 0" )
View Source
const ( InvocationTypeEvent InvocationType = "Event" InvocationTypeRequestResponse InvocationType = "RequestResponse" InvocationTypeDryRun InvocationType = "DryRun" LogTypeTail LogType = "Tail" LogTypeNone LogType = "None" SourceTypeDuerOS SourceType = "dueros" SourceTypeDuEdge SourceType = "duedge" SourceTypeHTTP SourceType = "cfc-http-trigger/v1/CFCAPI" SourceTypeCrontab SourceType = "cfc-crontab-trigger/v1/" SourceTypeCDN SourceType = "cdn" TriggerTypeHTTP TriggerType = "cfc-http-trigger" TriggerTypeGeneric TriggerType = "generic" )
View Source
const ( RegularFunctionName = `^[a-zA-Z0-9-_:]+|\$LATEST$` RegularAliasName = `^[a-zA-Z0-9-_]+$` RegularFunctionBRN = `^(brn:(bce[a-zA-Z-]*):cfc:)([a-z]{2,5}[0-9]*:)([0-9a-z]{32}:)(function:)([a-zA-Z0-9-_]+)(:(\$LATEST|[a-zA-Z0-9-_]+))?$` RegularVersion = `^\$LATEST|([0-9]+)$` MemoryBase = 128 )
Variables ¶
Functions ¶
func DeleteAlias ¶
func DeleteAlias(cli bce.Client, args *DeleteAliasArgs) error
func DeleteFunction ¶
func DeleteFunction(cli bce.Client, args *DeleteFunctionArgs) error
func DeleteReservedConcurrentExecutions ¶
func DeleteReservedConcurrentExecutions(cli bce.Client, args *DeleteReservedConcurrentExecutionsArgs) error
func DeleteTrigger ¶
func DeleteTrigger(cli bce.Client, args *DeleteTriggerArgs) error
func SetReservedConcurrentExecutions ¶
func SetReservedConcurrentExecutions(cli bce.Client, args *ReservedConcurrentExecutionsArgs) error
Types ¶
type Alias ¶
type Alias struct { AliasBrn string `json:"AliasBrn"` AliasArn string `json:"AliasArn"` FunctionName string `json:"FunctionName"` FunctionVersion string `json:"FunctionVersion"` Name string `json:"Name"` Description string `json:"Description"` Uid string `json:"Uid"` UpdatedAt time.Time `json:"UpdatedAt"` CreatedAt time.Time `json:"CreatedAt"` }
type BosEventType ¶
type BosEventType string
const ( BosEventTypePutObject BosEventType = "PutObject" BosEventTypePostObject BosEventType = "PostObject" BosEventTypeAppendObject BosEventType = "AppendObject" BosEventTypeCopyObject BosEventType = "CopyObject" BosEventTypeCompleteMultipartObject BosEventType = "CompleteMultipartObject" )
type BosTriggerData ¶
type BosTriggerData struct { Resource string Status string EventType []BosEventType Name string }
type CDNEventType ¶
type CDNEventType string
const ( CDNEventTypeCachedObjectsBlocked CDNEventType = "CachedObjectsBlocked" CDNEventTypeCachedObjectsPushed CDNEventType = "CachedObjectsPushed" CDNEventTypeCachedObjectsRefreshed CDNEventType = "CachedObjectsRefreshed" CDNEventTypeCdnDomainCreated CDNEventType = "CdnDomainCreated" CDNEventTypeCdnDomainDeleted CDNEventType = "CdnDomainDeleted" CDNEventTypeLogFileCreated CDNEventType = "LogFileCreated" CDNEventTypeCdnDomainStarted CDNEventType = "CdnDomainStarted" CDNEventTypeCdnDomainStopped CDNEventType = "CdnDomainStopped" )
type CDNTriggerData ¶
type CDNTriggerData struct { EventType CDNEventType Domains []string Remark string Status string }
type CFCEdgeTriggerData ¶ added in v0.9.7
type CodeStorage ¶
type CreateAliasArgs ¶
type CreateAliasArgs struct { FunctionName string FunctionVersion string Name string Description string }
func (CreateAliasArgs) Validate ¶
func (args CreateAliasArgs) Validate() error
type CreateAliasResult ¶
type CreateAliasResult Alias
func CreateAlias ¶
func CreateAlias(cli bce.Client, args *CreateAliasArgs) (*CreateAliasResult, error)
type CreateFunctionArgs ¶
type CreateFunctionArgs struct { Code *CodeFile FunctionName string Handler string Runtime string MemorySize int Timeout int Description string Environment *Environment VpcConfig *VpcConfig LogType string LogBosDir string }
func (CreateFunctionArgs) Validate ¶
func (args CreateFunctionArgs) Validate() error
type CreateFunctionResult ¶
type CreateFunctionResult Function
func CreateFunction ¶
func CreateFunction(cli bce.Client, args *CreateFunctionArgs) (*CreateFunctionResult, error)
type CreateTriggerArgs ¶
type CreateTriggerArgs struct { Target string Source SourceType Data interface{} }
func (CreateTriggerArgs) Validate ¶
func (args CreateTriggerArgs) Validate() error
type CreateTriggerResult ¶
type CreateTriggerResult struct {
Relation *RelationInfo
}
func CreateTrigger ¶
func CreateTrigger(cli bce.Client, args *CreateTriggerArgs) (*CreateTriggerResult, error)
type CrontabTriggerData ¶
type DeleteAliasArgs ¶
func (DeleteAliasArgs) Validate ¶
func (args DeleteAliasArgs) Validate() error
type DeleteFunctionArgs ¶
func (DeleteFunctionArgs) Validate ¶
func (args DeleteFunctionArgs) Validate() error
type DeleteReservedConcurrentExecutionsArgs ¶
type DeleteReservedConcurrentExecutionsArgs struct {
FunctionName string
}
func (DeleteReservedConcurrentExecutionsArgs) Validate ¶
func (args DeleteReservedConcurrentExecutionsArgs) Validate() error
type DeleteTriggerArgs ¶
type DeleteTriggerArgs struct { RelationId string Target string Source SourceType }
func (DeleteTriggerArgs) Validate ¶
func (args DeleteTriggerArgs) Validate() error
type Environment ¶
type Function ¶
type Function struct { Uid string `json:"Uid"` Description string `json:"Description"` FunctionBrn string `json:"FunctionBrn"` Region string `json:"Region"` Timeout int `json:"Timeout"` VersionDesc string `json:"VersionDesc"` UpdatedAt time.Time `json:"UpdatedAt"` LastModified time.Time `json:"LastModified"` CodeSha256 string `json:"CodeSha256"` CodeSize int32 `json:"CodeSize"` FunctionArn string `json:"FunctionArn"` FunctionName string `json:"FunctionName"` Handler string `json:"Handler"` Version string `json:"Version"` Runtime string `json:"Runtime"` MemorySize int `json:"MemorySize"` Environment *Environment `json:"Environment"` CommitID string `json:"CommitID"` CodeID string `json:"CodeID"` Role string `json:"Role"` VpcConfig *VpcConfig `json:"VpcConfig"` LogType string `json:"LogType"` LogBosDir string `json:"LogBosDir"` SourceTag string `json:"SourceTag"` }
type FunctionInfo ¶
type FunctionInfo struct { Code *CodeStorage `json:"Code"` Configuration *Function `json:"Configuration"` }
functionInfo
type GetAliasArgs ¶
func (GetAliasArgs) Validate ¶
func (args GetAliasArgs) Validate() error
type GetAliasResult ¶
type GetAliasResult Alias
func GetAlias ¶
func GetAlias(cli bce.Client, args *GetAliasArgs) (*GetAliasResult, error)
type GetFunctionArgs ¶
func (GetFunctionArgs) Validate ¶
func (args GetFunctionArgs) Validate() error
type GetFunctionConfigurationArgs ¶
func (GetFunctionConfigurationArgs) Validate ¶
func (args GetFunctionConfigurationArgs) Validate() error
type GetFunctionConfigurationResult ¶
type GetFunctionConfigurationResult Function
func GetFunctionConfiguration ¶
func GetFunctionConfiguration(cli bce.Client, args *GetFunctionConfigurationArgs) (*GetFunctionConfigurationResult, error)
type GetFunctionResult ¶
type GetFunctionResult struct { Code CodeStorage Configuration Function }
func GetFunction ¶
func GetFunction(cli bce.Client, args *GetFunctionArgs) (*GetFunctionResult, error)
type HTTPMethod ¶
type HTTPMethod = string
const ( GET HTTPMethod = "GET" PUT HTTPMethod = "PUT" POST HTTPMethod = "POST" DELETE HTTPMethod = "DELETE" HEAD HTTPMethod = "HEAD" OPTIONS HTTPMethod = "OPTIONS" )
type HttpTriggerData ¶
type InvocationType ¶
type InvocationType string
type InvocationsArgs ¶
type InvocationsArgs struct { FunctionName string InvocationType InvocationType LogType LogType Qualifier string Payload interface{} }
func (InvocationsArgs) Validate ¶
func (args InvocationsArgs) Validate() error
type InvocationsResult ¶
func Invocations ¶
func Invocations(cli bce.Client, args *InvocationsArgs) (*InvocationsResult, error)
type ListAliasesArgs ¶
func (ListAliasesArgs) Validate ¶
func (args ListAliasesArgs) Validate() error
type ListAliasesResult ¶
func ListAliases ¶
func ListAliases(cli bce.Client, args *ListAliasesArgs) (*ListAliasesResult, error)
type ListFunctionsArgs ¶
func (ListFunctionsArgs) Validate ¶
func (args ListFunctionsArgs) Validate() error
type ListFunctionsResult ¶
func ListFunctions ¶
func ListFunctions(cli bce.Client, args *ListFunctionsArgs) (*ListFunctionsResult, error)
type ListTriggersArgs ¶
func (ListTriggersArgs) Validate ¶
func (args ListTriggersArgs) Validate() error
type ListTriggersResult ¶
type ListTriggersResult struct {
Relation []*RelationInfo
}
func ListTriggers ¶
func ListTriggers(cli bce.Client, args *ListTriggersArgs) (*ListTriggersResult, error)
type ListVersionsByFunctionArgs ¶
func (ListVersionsByFunctionArgs) Validate ¶
func (args ListVersionsByFunctionArgs) Validate() error
type ListVersionsByFunctionResult ¶
func ListVersionsByFunction ¶
func ListVersionsByFunction(cli bce.Client, args *ListVersionsByFunctionArgs) (*ListVersionsByFunctionResult, error)
type Operation ¶
type Operation struct { HTTPMethod HTTPMethod HTTPUri string }
type PublishVersionArgs ¶
func (PublishVersionArgs) Validate ¶
func (args PublishVersionArgs) Validate() error
type PublishVersionResult ¶
type PublishVersionResult Function
func PublishVersion ¶
func PublishVersion(cli bce.Client, args *PublishVersionArgs) (*PublishVersionResult, error)
type RelationInfo ¶
type RelationInfo struct { RelationId string `json:"RelationId"` Sid string `json:"Sid"` Source SourceType `json:"Source"` Target string `json:"Target"` Data interface{} `json:"Data"` }
type ReservedConcurrentExecutionsArgs ¶
type ReservedConcurrentExecutionsArgs struct { FunctionName string ReservedConcurrentExecutions int }
func (ReservedConcurrentExecutionsArgs) Validate ¶
func (args ReservedConcurrentExecutionsArgs) Validate() error
type SourceType ¶
type SourceType string
type TriggerType ¶
type TriggerType string
type UpdateAliasArgs ¶
type UpdateAliasArgs struct { FunctionName string AliasName string FunctionVersion string Description string }
func (UpdateAliasArgs) Validate ¶
func (args UpdateAliasArgs) Validate() error
type UpdateAliasResult ¶
type UpdateAliasResult Alias
func UpdateAlias ¶
func UpdateAlias(cli bce.Client, args *UpdateAliasArgs) (*UpdateAliasResult, error)
type UpdateFunctionCodeArgs ¶
type UpdateFunctionCodeArgs struct { FunctionName string ZipFile []byte Publish bool DryRun bool BosBucket string BosObject string }
func (UpdateFunctionCodeArgs) Validate ¶
func (args UpdateFunctionCodeArgs) Validate() error
type UpdateFunctionCodeResult ¶
type UpdateFunctionCodeResult Function
func UpdateFunctionCode ¶
func UpdateFunctionCode(cli bce.Client, args *UpdateFunctionCodeArgs) (*UpdateFunctionCodeResult, error)
type UpdateFunctionConfigurationArgs ¶
type UpdateFunctionConfigurationArgs struct { FunctionName string Timeout int `json:"Timeout,omitempty"` MemorySize int `json:"MemorySize,omitempty"` Description string Handler string Runtime string Environment *Environment VpcConfig *VpcConfig LogType string LogBosDir string }
func (UpdateFunctionConfigurationArgs) Validate ¶
func (args UpdateFunctionConfigurationArgs) Validate() error
type UpdateFunctionConfigurationResult ¶
type UpdateFunctionConfigurationResult Function
func UpdateFunctionConfiguration ¶
func UpdateFunctionConfiguration(cli bce.Client, args *UpdateFunctionConfigurationArgs) (*UpdateFunctionConfigurationResult, error)
type UpdateTriggerArgs ¶
type UpdateTriggerArgs struct { RelationId string Target string Source SourceType Data interface{} }
func (UpdateTriggerArgs) Validate ¶
func (args UpdateTriggerArgs) Validate() error
type UpdateTriggerResult ¶
type UpdateTriggerResult struct {
Relation *RelationInfo
}
func UpdateTrigger ¶
func UpdateTrigger(cli bce.Client, args *UpdateTriggerArgs) (*UpdateTriggerResult, error)
Click to show internal directories.
Click to hide internal directories.