Documentation ¶
Index ¶
- Constants
- func List(client *gophercloud.ServiceClient, opts ListOptsBuilder) pagination.Pager
- func ListAlias(c *gophercloud.ServiceClient, functionUrn string) pagination.Pager
- func ListVersions(c *gophercloud.ServiceClient, opts ListOptsBuilder, functionUrn string) pagination.Pager
- type AliasResult
- type CreateAliasOpts
- type CreateOpts
- type CreateOptsBuilder
- type CreateResult
- func AsyncInvoke(c *gophercloud.ServiceClient, m map[string]interface{}, functionUrn string) (r CreateResult)
- func Create(c *gophercloud.ServiceClient, opts CreateOptsBuilder) (r CreateResult)
- func CreateAlias(c *gophercloud.ServiceClient, opts CreateOptsBuilder, functionUrn string) (r CreateResult)
- func CreateVersion(c *gophercloud.ServiceClient, opts CreateOptsBuilder, functionUrn string) (r CreateResult)
- func Invoke(c *gophercloud.ServiceClient, m map[string]interface{}, functionUrn string) (r CreateResult)
- type CreateVersionOpts
- type DeleteResult
- type Dependency
- type FuncMount
- type FuncVpc
- type Function
- type FunctionBase
- type FunctionCode
- type FunctionCodeOpts
- type FunctionList
- type FunctionPage
- type FunctionVersion
- type GetResult
- type ListOpts
- type ListOptsBuilder
- type MountConfig
- type MountUser
- type StrategyConfig
- type UpdateAliasOpts
- type UpdateCodeOpts
- type UpdateMetadataOpts
- type UpdateOptsBuilder
- type UpdateResult
- func UpdateAlias(c *gophercloud.ServiceClient, functionUrn, aliasName string, ...) (r UpdateResult)
- func UpdateCode(c *gophercloud.ServiceClient, functionUrn string, opts UpdateOptsBuilder) (r UpdateResult)
- func UpdateMetadata(c *gophercloud.ServiceClient, functionUrn string, opts UpdateOptsBuilder) (r UpdateResult)
- type Versions
Constants ¶
const ( FGS = "fgs" FUNCTION = "functions" CODE = "code" CONFIG = "config" VERSION = "versions" ALIAS = "aliases" INVOKE = "invocations" ASINVOKE = "invocations-async" )
Variables ¶
This section is empty.
Functions ¶
func List ¶
func List(client *gophercloud.ServiceClient, opts ListOptsBuilder) pagination.Pager
functions list
func ListAlias ¶
func ListAlias(c *gophercloud.ServiceClient, functionUrn string) pagination.Pager
Querying the Aliases of a Function's All Versions
func ListVersions ¶
func ListVersions(c *gophercloud.ServiceClient, opts ListOptsBuilder, functionUrn string) pagination.Pager
Querying the Alias Information of a Function Version
Types ¶
type AliasResult ¶
type AliasResult struct { Name string `json:"name"` Version string `json:"version"` Description string `json:"description"` LastModified string `json:"last_modified"` AliasUrn string `json:"alias_urn"` }
func ExtractAliasList ¶
func ExtractAliasList(r pagination.Page) ([]AliasResult, error)
type CreateAliasOpts ¶
type CreateAliasOpts struct { Name string `json:"name" required:"true"` Version string `json:"version" required:"true"` }
Alias struct
func (CreateAliasOpts) ToCreateFunctionMap ¶
func (opts CreateAliasOpts) ToCreateFunctionMap() (map[string]interface{}, error)
type CreateOpts ¶
type CreateOpts struct { FuncName string `json:"func_name" required:"true"` Package string `json:"package" required:"true"` CodeType string `json:"code_type" required:"true"` CodeUrl string `json:"code_url,omitempty"` Description string `json:"description,omitempty"` CodeFilename string `json:"code_filename,omitempty"` Handler string `json:"handler" required:"true"` MemorySize int `json:"memory_size" required:"true"` Runtime string `json:"runtime" required:"true"` Timeout int `json:"timeout" required:"true"` UserData string `json:"user_data,omitempty"` Xrole string `json:"xrole,omitempty"` AppXrole string `json:"app_xrole,omitempty"` DependencyPkg string `json:"dependency_pkg,omitempty"` FuncCode FunctionCodeOpts `json:"func_code" required:"true"` }
function struct
func (CreateOpts) ToCreateFunctionMap ¶
func (opts CreateOpts) ToCreateFunctionMap() (map[string]interface{}, error)
type CreateOptsBuilder ¶
Create function
type CreateResult ¶
type CreateResult struct {
// contains filtered or unexported fields
}
func AsyncInvoke ¶
func AsyncInvoke(c *gophercloud.ServiceClient, m map[string]interface{}, functionUrn string) (r CreateResult)
Executing a Function Asynchronously
func Create ¶
func Create(c *gophercloud.ServiceClient, opts CreateOptsBuilder) (r CreateResult)
create funtion
func CreateAlias ¶
func CreateAlias(c *gophercloud.ServiceClient, opts CreateOptsBuilder, functionUrn string) (r CreateResult)
Creating an Alias for a Function Version
func CreateVersion ¶
func CreateVersion(c *gophercloud.ServiceClient, opts CreateOptsBuilder, functionUrn string) (r CreateResult)
Publishing a Function Version
func Invoke ¶
func Invoke(c *gophercloud.ServiceClient, m map[string]interface{}, functionUrn string) (r CreateResult)
Executing a Function Synchronously
func (CreateResult) ExtractAlias ¶
func (r CreateResult) ExtractAlias() (*AliasResult, error)
func (CreateResult) ExtractInvoke ¶
func (r CreateResult) ExtractInvoke() (interface{}, error)
type CreateVersionOpts ¶
type CreateVersionOpts struct { Digest string `json:"digest,omitempty"` Description string `json:"description,omitempty"` Version string `json:"version,omitempty"` }
verstion struct
func (CreateVersionOpts) ToCreateFunctionMap ¶
func (opts CreateVersionOpts) ToCreateFunctionMap() (map[string]interface{}, error)
type DeleteResult ¶
type DeleteResult struct {
gophercloud.ErrResult
}
func Delete ¶
func Delete(c *gophercloud.ServiceClient, functionUrn string) (r DeleteResult)
Deleting a Function or Function Version
func DeleteAlias ¶
func DeleteAlias(c *gophercloud.ServiceClient, functionUrn, aliasName string) (r DeleteResult)
Deleting an Alias of a Function Version
type Dependency ¶
type Dependency struct { Id string `json:"id"` Owner string `json:"owner"` Namespace string `json:"-"` Link string `json:"link"` Runtime string `json:"runtime"` ETag string `json:"etag"` Size int64 `json:"size"` Name string `json:"name"` Description string `json:"description"` FileName string `json:"file_name,omitempty"` FuncVersions []*FunctionVersion `json:"-"` SaveType int `json:"-"` }
dependency
type FuncMount ¶
type FuncMount struct { Id string `json:"id"` MountType string `json:"mount_type"` MountResource string `json:"mount_resource"` LocalMountPath string `json:"local_mount_path" description:"local file path in function runtime environment"` UserGroupId *int `json:"-"` UserId *int `json:"-"` Status string `json:"status"` //ACTIVE或DISABLED,和触发器类似。如果已经存在的配置不可用了processrouter不会挂载。 ProjectId string `json:"-"` FuncVersions []*FunctionVersion `json:"-"` SaveType int `json:"-"` //仅仅在数据处理时用到,如果需要保存新的映射关系,则将其置为1,如要删除老的,将其置为2 }
type FuncVpc ¶
type FuncVpc struct { Id string `json:"-"` DomainId string `json:"-" validate:"regexp=^[a-zA-Z0-9-]+$" description:"domain id"` Namespace string `json:"-"` VpcName string `json:"vpc_name"` VpcId string `json:"vpc_id"` SubnetName string `json:"subnet_name"` SubnetId string `json:"subnet_id"` Cidr string `json:"cidr"` Gateway string `json:"gateway"` }
type Function ¶
type Function struct { Id string `json:"-"` FuncId string `json:"-"` FuncUrn string `json:"func_urn"` FuncName string `json:"func_name"` DomainId string `json:"domain_id"` Namespace string `json:"namespace"` ProjectName string `json:"project_name"` Package string `json:"package"` Runtime string `json:"runtime"` Timeout int `json:"timeout"` Handler string `json:"handler"` MemorySize int `json:"memory_size"` Cpu int `json:"cpu"` CodeType string `json:"code_type"` CodeUrl string `json:"code_url"` CodeFileName string `json:"code_filename"` CodeSize int64 `json:"code_size"` UserData string `json:"user_data"` Digest string `json:"digest"` Version string `json:"version"` ImageName string `json:"image_name"` Xrole string `json:"xrole"` AppXrole *string `json:"app_xrole"` Description string `json:"description"` VersionDescription string `json:"version_description"` LastmodifiedUtc int64 `json:"-"` LastModified string `json:"last_modified"` FuncCode FunctionCode `json:"func_code"` FuncVpc *FuncVpc `json:"func_vpc"` MountConfig *MountConfig `json:"mount_config,omitempty"` Concurrency int `json:"-"` DependList []string `json:"depend_list"` StrategyConfig StrategyConfig `json:"strategy_config"` ExtendConfig string `json:"extend_config"` Dependencies []*Dependency `json:"dependencies"` InitializerTimeout int `json:"initializer_timeout,omitempty"` InitializerHandler string `json:"initializer_handler,omitempty"` }
type FunctionBase ¶
type FunctionBase struct { Id string `json:"-"` FuncName string `json:"func_name"` DomainId string `description:"domain id"` Namespace string `json:"namespace"` ProjectName string `json:"project_name"` Package string `json:"package"` }
noinspection GoNameStartsWithPackageName
type FunctionCode ¶
noinspection GoNameStartsWithPackageName
type FunctionCodeOpts ¶
funcCode struct
type FunctionList ¶
type FunctionList struct { Functions []Function `json:"functions"` NextMarker int `json:"next_marker"` }
noinspection GoNameStartsWithPackageName
func ExtractList ¶
func ExtractList(r pagination.Page) (FunctionList, error)
type FunctionPage ¶
type FunctionPage struct {
pagination.SinglePageBase
}
type FunctionVersion ¶
type FunctionVersion struct { Id string `json:"-"` FuncId string `json:"-"` Runtime string `json:"runtime"` Timeout int `json:"timeout"` Handler string `json:"handler"` MemorySize int `json:"memory_size"` Cpu int `json:"cpu"` CodeType string `json:"code_type"` CodeUrl string `json:"code_url"` CodeFileName string `json:"code_file_name"` CodeSize int64 `json:"code_size"` UserData string `json:"user_data"` ImageName string `json:"image_name"` Digest string `json:"digest"` Version string `json:"version"` Xrole string `json:"xrole"` AppXrole string `json:"app_xrole"` Description string `json:"description"` VersionDescription string `json:"version_description"` LastModified int64 `json:"last_modified"` Concurrency int `json:"concurrency"` ExtendConfig string `json:"extend_config"` Dependencies []*Dependency `json:"dependencies"` FuncBase *FunctionBase `json:"func_base"` FuncVpcId string `json:"-"` FuncMounts []*FuncMount MountConfig *MountConfig `json:"mount_config"` Vpc *FuncVpc `json:"vpc"` InitializerTimeout int InitializerHandler string `description:"the function initializer handler"` }
noinspection GoNameStartsWithPackageName
type GetResult ¶
type GetResult struct {
// contains filtered or unexported fields
}
func GetAlias ¶
func GetAlias(c *gophercloud.ServiceClient, functionUrn, aliasName string) (r GetResult)
Querying the Alias Information of a Function Version
func GetCode ¶
func GetCode(c *gophercloud.ServiceClient, functionUrn string) (r GetResult)
Querying the Code of a Function
func GetMetadata ¶
func GetMetadata(c *gophercloud.ServiceClient, functionUrn string) (r GetResult)
Querying the Metadata Information of a Function
func (GetResult) ExtractAlias ¶
func (r GetResult) ExtractAlias() (*AliasResult, error)
func (GetResult) ExtractInvoke ¶
func (r GetResult) ExtractInvoke() (interface{}, error)
type ListOptsBuilder ¶
type MountConfig ¶
type StrategyConfig ¶
type StrategyConfig struct {
Concurrency *int `json:"concurrency"`
}
type UpdateAliasOpts ¶
type UpdateAliasOpts struct { Version string `json:"version" required:"true"` Description string `json:"description,omitempty"` }
Alias struct for update
func (UpdateAliasOpts) ToUpdateMap ¶
func (opts UpdateAliasOpts) ToUpdateMap() (map[string]interface{}, error)
type UpdateCodeOpts ¶
type UpdateCodeOpts struct { CodeType string `json:"code_type" required:"true"` CodeUrl string `json:"code_url,omitempty"` DependencyPkg string `json:"dependency_pkg,omitempty"` FuncCode FunctionCodeOpts `json:"func_code,omitempty"` }
Function struct for update
func (UpdateCodeOpts) ToUpdateMap ¶
func (opts UpdateCodeOpts) ToUpdateMap() (map[string]interface{}, error)
type UpdateMetadataOpts ¶
type UpdateMetadataOpts struct { Runtime string `json:"runtime" required:"true"` CodeType string `json:"code_type" required:"true"` CodeUrl string `json:"code_url,omitempty"` Description string `json:"description,omitempty"` MemorySize int `json:"memory_size" required:"true"` Handler string `json:"handler" required:"true"` Timeout int `json:"timeout" required:"true"` UserData string `json:"user_data,omitempty"` DependencyPkg string `json:"dependency_pkg,omitempty"` Xrole string `json:"xrole,omitempty"` AppXrole string `json:"app_xrole,omitempty"` }
Metadata struct for update
func (UpdateMetadataOpts) ToUpdateMap ¶
func (opts UpdateMetadataOpts) ToUpdateMap() (map[string]interface{}, error)
type UpdateOptsBuilder ¶
type UpdateResult ¶
type UpdateResult struct {
// contains filtered or unexported fields
}
func UpdateAlias ¶
func UpdateAlias(c *gophercloud.ServiceClient, functionUrn, aliasName string, opts UpdateOptsBuilder) (r UpdateResult)
Modifying the Alias Information of a Function Version
func UpdateCode ¶
func UpdateCode(c *gophercloud.ServiceClient, functionUrn string, opts UpdateOptsBuilder) (r UpdateResult)
Modifying the Code of a Function
func UpdateMetadata ¶
func UpdateMetadata(c *gophercloud.ServiceClient, functionUrn string, opts UpdateOptsBuilder) (r UpdateResult)
Modifying the Metadata Information of a Function
func (UpdateResult) ExtractAlias ¶
func (r UpdateResult) ExtractAlias() (*AliasResult, error)
func (UpdateResult) ExtractInvoke ¶
func (r UpdateResult) ExtractInvoke() (interface{}, error)
type Versions ¶
func ExtractVersionlist ¶
func ExtractVersionlist(r pagination.Page) (Versions, error)