Documentation
¶
Index ¶
- Constants
- Variables
- type CreditDB
- func (c *CreditDB) Close(ctx context.Context) error
- func (c *CreditDB) DeleteLine(ctx context.Context, key string) error
- func (c *CreditDB) Exists(ctx context.Context, key string) (bool, error)
- func (c *CreditDB) Flush(ctx context.Context) error
- func (c *CreditDB) GetAllLines(ctx context.Context) ([]Line, error)
- func (c *CreditDB) GetCurrentPage() uint
- func (c *CreditDB) GetLine(ctx context.Context, key string) (*Line, error)
- func (c *CreditDB) Health(ctx context.Context) error
- func (c *CreditDB) Ping(ctx context.Context) (string, error)
- func (c *CreditDB) SetLine(ctx context.Context, key, value string) error
- func (c *CreditDB) WithHost(host string) *CreditDB
- func (c *CreditDB) WithPage(page uint) *CreditDB
- type Error
- type Line
- type Page
Constants ¶
View Source
const ( CategoryNotFound = "NotFound" CategoryBadRequest = "BadRequest" CategoryTimeout = "Timeout" CategoryInternalError = "InternalError" )
Variables ¶
View Source
var ( ErrNotFound = NewError("key not found", CategoryNotFound) ErrBadRequest = NewError("bad request", CategoryBadRequest) ErrInternalError = NewError("internal server error", CategoryInternalError) ErrTimeout = NewError("timeout", CategoryTimeout) )
Functions ¶
This section is empty.
Types ¶
type CreditDB ¶
type CreditDB struct {
// contains filtered or unexported fields
}
func (*CreditDB) GetCurrentPage ¶
type Error ¶
func (*Error) StatusCode ¶
Click to show internal directories.
Click to hide internal directories.