Documentation ¶
Index ¶
- Constants
- type API
- func (a *API) Create(ctx context.Context, redisRule CreateRedisRuleRequest) (int, error)
- func (a *API) Delete(ctx context.Context, id int) error
- func (a API) Get(ctx context.Context, id int) (*GetRedisRuleResponse, error)
- func (a API) List(ctx context.Context) ([]*GetRedisRuleResponse, error)
- func (a *API) Update(ctx context.Context, id int, redisRule CreateRedisRuleRequest) error
- type CreateRedisRuleRequest
- type GetRedisRuleResponse
- type HttpClient
- type ListRedisRulesResponse
- type Log
- type NotFound
- type TaskWaiter
Constants ¶
View Source
const ( // StatusActive is the active value of the `Status` field in `RedisRule` StatusActive = "active" // StatusPending is the pending value of the `Status` field in `RedisRule` StatusPending = "pending" // StatusError is the error value of the `Status` field in `RedisRule` StatusError = "error" // StatusDeleting is the deleting value of the `Status` field in `RedisRule` 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 CreateRedisRuleRequest ¶
type CreateRedisRuleRequest struct { Name *string `json:"name,omitempty"` RedisRule *string `json:"redisRule,omitempty"` }
func (CreateRedisRuleRequest) String ¶
func (o CreateRedisRuleRequest) String() string
type GetRedisRuleResponse ¶
type GetRedisRuleResponse struct { ID *int `json:"id,omitempty"` Name *string `json:"name,omitempty"` ACL *string `json:"acl,omitempty"` IsDefault *bool `json:"isDefault,omitempty"` Status *string `json:"status,omitempty"` }
func (GetRedisRuleResponse) String ¶
func (o GetRedisRuleResponse) String() string
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 ListRedisRulesResponse ¶
type ListRedisRulesResponse struct { AccountId *int `json:"accountId,omitempty"` RedisRules []*GetRedisRuleResponse `json:"redisRules,omitempty"` }
func (ListRedisRulesResponse) String ¶
func (o ListRedisRulesResponse) String() string
Click to show internal directories.
Click to hide internal directories.