Documentation
¶
Index ¶
- type CacheService
- func (t *CacheService) Decrement(request *DecrementRequest) (*DecrementResponse, error)
- func (t *CacheService) Delete(request *DeleteRequest) (*DeleteResponse, error)
- func (t *CacheService) Get(request *GetRequest) (*GetResponse, error)
- func (t *CacheService) Increment(request *IncrementRequest) (*IncrementResponse, error)
- func (t *CacheService) Set(request *SetRequest) (*SetResponse, error)
- type DecrementRequest
- type DecrementResponse
- type DeleteRequest
- type DeleteResponse
- type GetRequest
- type GetResponse
- type IncrementRequest
- type IncrementResponse
- type SetRequest
- type SetResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CacheService ¶
type CacheService struct {
// contains filtered or unexported fields
}
func NewCacheService ¶
func NewCacheService(token string) *CacheService
func (*CacheService) Decrement ¶
func (t *CacheService) Decrement(request *DecrementRequest) (*DecrementResponse, error)
Decrement a value (if it's a number)
func (*CacheService) Delete ¶
func (t *CacheService) Delete(request *DeleteRequest) (*DeleteResponse, error)
Delete a value from the cache
func (*CacheService) Get ¶
func (t *CacheService) Get(request *GetRequest) (*GetResponse, error)
Get an item from the cache by key
func (*CacheService) Increment ¶
func (t *CacheService) Increment(request *IncrementRequest) (*IncrementResponse, error)
Increment a value (if it's a number)
func (*CacheService) Set ¶
func (t *CacheService) Set(request *SetRequest) (*SetResponse, error)
Set an item in the cache. Overwrites any existing value already set.
type DecrementRequest ¶
type DecrementResponse ¶
type DeleteRequest ¶
type DeleteRequest struct { // The key to delete Key string `json:"key"` }
type DeleteResponse ¶
type DeleteResponse struct { // Returns "ok" if successful Status string `json:"status"` }
type GetRequest ¶
type GetRequest struct { // The key to retrieve Key string `json:"key"` }
type GetResponse ¶
type IncrementRequest ¶
type IncrementResponse ¶
type SetRequest ¶
type SetResponse ¶
type SetResponse struct { // Returns "ok" if successful Status string `json:"status"` }
Click to show internal directories.
Click to hide internal directories.