Documentation ¶
Index ¶
- Constants
- type API
- func (a *API) Create(ctx context.Context, role CreateRoleRequest) (int, error)
- func (a *API) Delete(ctx context.Context, id int) error
- func (a API) Get(ctx context.Context, id int) (*GetRoleResponse, error)
- func (a API) List(ctx context.Context) ([]*GetRoleResponse, error)
- func (a *API) Update(ctx context.Context, id int, role CreateRoleRequest) error
- type CreateDatabaseInRuleInRoleRequest
- type CreateRoleRequest
- type CreateRuleInRoleRequest
- type GetDatabaseInRuleInRoleResponse
- type GetRoleResponse
- type GetRuleInRoleResponse
- type GetUserInRoleResponse
- type HttpClient
- type ListRolesResponse
- type Log
- type NotFound
- type TaskWaiter
Constants ¶
View Source
const ( // StatusActive is the active value of the `Status` field in `Role` StatusActive = "active" // StatusPending is the pending value of the `Status` field in `Role` StatusPending = "pending" // StatusError is the error value of the `Status` field in `Role` StatusError = "error" // StatusDeleting is the deleting value of the `Status` field in `Role` StatusDeleting = "deleting" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type API ¶
type API struct {
// contains filtered or unexported fields
}
func NewAPI ¶
func NewAPI(client HttpClient, taskWaiter TaskWaiter, logger Log) *API
type CreateDatabaseInRuleInRoleRequest ¶
type CreateDatabaseInRuleInRoleRequest struct { SubscriptionId *int `json:"subscriptionId,omitempty"` DatabaseId *int `json:"databaseId,omitempty"` Regions []*string `json:"regions,omitempty"` }
func (CreateDatabaseInRuleInRoleRequest) String ¶
func (o CreateDatabaseInRuleInRoleRequest) String() string
type CreateRoleRequest ¶
type CreateRoleRequest struct { Name *string `json:"name,omitempty"` RedisRules []*CreateRuleInRoleRequest `json:"redisRules,omitempty"` }
func (CreateRoleRequest) String ¶
func (o CreateRoleRequest) String() string
type CreateRuleInRoleRequest ¶
type CreateRuleInRoleRequest struct { RuleName *string `json:"ruleName,omitempty"` Databases []*CreateDatabaseInRuleInRoleRequest `json:"databases,omitempty"` }
func (CreateRuleInRoleRequest) String ¶
func (o CreateRuleInRoleRequest) String() string
type GetDatabaseInRuleInRoleResponse ¶
type GetDatabaseInRuleInRoleResponse struct { SubscriptionId *int `json:"subscriptionId,omitempty"` DatabaseId *int `json:"databaseId,omitempty"` DatabaseName *string `json:"databaseName,omitempty"` Regions []*string `json:"regions,omitempty"` }
func (GetDatabaseInRuleInRoleResponse) String ¶
func (o GetDatabaseInRuleInRoleResponse) String() string
type GetRoleResponse ¶
type GetRoleResponse struct { ID *int `json:"id,omitempty"` Name *string `json:"name,omitempty"` RedisRules []*GetRuleInRoleResponse `json:"redisRules,omitempty"` Users []*GetUserInRoleResponse `json:"users,omitempty"` Status *string `json:"status,omitempty"` }
func (GetRoleResponse) String ¶
func (o GetRoleResponse) String() string
type GetRuleInRoleResponse ¶
type GetRuleInRoleResponse struct { RuleId *int `json:"ruleId,omitempty"` RuleName *string `json:"ruleName,omitempty"` Databases []*GetDatabaseInRuleInRoleResponse `json:"databases,omitempty"` }
func (GetRuleInRoleResponse) String ¶
func (o GetRuleInRoleResponse) String() string
type GetUserInRoleResponse ¶
type HttpClient ¶
type HttpClient interface { Get(ctx context.Context, name, path string, responseBody interface{}) error Post(ctx context.Context, name, path string, requestBody interface{}, responseBody interface{}) error Put(ctx context.Context, name, path string, requestBody interface{}, responseBody interface{}) error Delete(ctx context.Context, name, path string, responseBody interface{}) error }
type ListRolesResponse ¶
type ListRolesResponse struct { AccountId *int `json:"accountId,omitempty"` Roles []*GetRoleResponse `json:"roles,omitempty"` }
Click to show internal directories.
Click to hide internal directories.