Documentation
¶
Index ¶
- func Delete(client *golangsdk.ServiceClient, gatewayID, authorizerID string) (err error)
- type AuthorizerPage
- type AuthorizerResp
- func Create(client *golangsdk.ServiceClient, opts CreateOpts) (*AuthorizerResp, error)
- func ExtractAuthorizers(r pagination.NewPage) ([]AuthorizerResp, error)
- func Get(client *golangsdk.ServiceClient, gatewayID, authorizerID string) (*AuthorizerResp, error)
- func List(client *golangsdk.ServiceClient, opts ListOpts) ([]AuthorizerResp, error)
- func Update(client *golangsdk.ServiceClient, authorizerID string, opts CreateOpts) (*AuthorizerResp, error)
- type CreateOpts
- type Identity
- type ListOpts
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AuthorizerPage ¶
type AuthorizerPage struct {
pagination.NewSinglePageBase
}
type AuthorizerResp ¶
type AuthorizerResp struct {
// Custom authorizer ID.
ID string `json:"id"`
// Custom authorizer name.
Name string `json:"name"`
// Custom authorizer type.
Type string `json:"type"`
// Authorizer type
AuthorizerType string `json:"authorizer_type"`
// Function URN.
FunctionUrn string `json:"authorizer_uri"`
// Function version.
Version string `json:"authorizer_version"`
// Function alias URN.
AliasUrn string `json:"authorizer_alias_uri"`
// Identity source.
Identities []Identity `json:"identities"`
// Maximum cache age.
Ttl *int `json:"ttl"`
// User data.
UserData string `json:"user_data"`
// Custom backend ID.
CustomBackendID string `json:"ld_api_id"`
// Indicates whether to send the body.
NeedBody *bool `json:"need_body"`
// Creation time.
CreatedAt string `json:"create_time"`
// ID of the application to which the custom authorizer belongs.
AppID string `json:"roma_app_id"`
// Name of the application to which the custom authorizer belongs.
AppName string `json:"roma_app_name"`
}
func Create ¶
func Create(client *golangsdk.ServiceClient, opts CreateOpts) (*AuthorizerResp, error)
func ExtractAuthorizers ¶
func ExtractAuthorizers(r pagination.NewPage) ([]AuthorizerResp, error)
func Get ¶
func Get(client *golangsdk.ServiceClient, gatewayID, authorizerID string) (*AuthorizerResp, error)
func List ¶
func List(client *golangsdk.ServiceClient, opts ListOpts) ([]AuthorizerResp, error)
func Update ¶
func Update(client *golangsdk.ServiceClient, authorizerID string, opts CreateOpts) (*AuthorizerResp, error)
type CreateOpts ¶
type CreateOpts struct {
GatewayID string `json:"-"`
// Custom authorizer name.
// It can contain 3 to 64 characters, starting with a letter. Only letters, digits, and underscores (_) are allowed.
Name string `json:"name" required:"true"`
// Custom authorizer type.
// FRONTEND
// BACKEND
Type string `json:"type" required:"true"`
// Enumeration values:
// FUNC
AuthorizerType string `json:"authorizer_type" required:"true"`
// Function URN.
FunctionUrn string `json:"authorizer_uri" required:"true"`
// Function version.
// If both a function alias URN and version are passed, the alias URN will be used and the version will be ignored.
Version string `json:"authorizer_version,omitempty"`
// Function alias URN.
// If both a function alias URN and version are passed, the alias URN will be used and the version will be ignored.
AliasUrn string `json:"authorizer_alias_uri,omitempty"`
// Identity source.
Identities []Identity `json:"identities,omitempty"`
// Maximum cache age.
Ttl *int `json:"ttl,omitempty"`
// User data.
UserData string `json:"user_data,omitempty"`
// Custom backend ID.
// Currently, this parameter is not supported.
CustomBackendID string `json:"ld_api_id,omitempty"`
// Indicates whether to send the body.
NeedBody *bool `json:"need_body,omitempty"`
}
type Identity ¶
type Identity struct {
// Parameter name.
Name string `json:"name" required:"true"`
// Parameter location.
// Enumeration values:
// HEADER
// QUERY
Location string `json:"location" required:"true"`
// Parameter verification expression.
// The default value is null, indicating that no verification is performed.
Validation string `json:"validation,omitempty"`
}
type ListOpts ¶
type ListOpts struct {
GatewayID string `json:"-"`
// Offset from which the query starts.
// If the value is less than 0, it is automatically converted to 20.
Offset *int `q:"offset"`
// Number of items displayed on each page.
// A value less than or equal to 0 will be automatically converted to 20,
// and a value greater than 500 will be automatically converted to 500.
Limit int `q:"limit"`
// Authorizer id
ID string `q:"id"`
// Authorizer name
Name string `q:"mame,"`
// Authorizer type
Type string `q:"type"`
}
Click to show internal directories.
Click to hide internal directories.