Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNoRecord = errors.New("no record found")
ErrNoRecord indicates no record found error
View Source
var ErrOperationExists = errors.New("operation exists")
ErrOperationExists indicates existing operation for the record
Functions ¶
This section is empty.
Types ¶
type Changes ¶
type Changes struct { From *time.Time `json:"from,omitempty"` Till *time.Time `json:"till,omitempty"` Data []*Key `json:"data,omitempty"` }
Changes response
type CreateInput ¶
type CreateInput struct { ID string `json:"id,omitempty"` OperationID string `json:"operationID,omitempty"` Service string `json:"service,omitempty"` Credits float64 `json:"credits,omitempty"` ValidTo *time.Time `json:"validTo,omitempty"` SaveRequests bool `json:"saveRequests,omitempty"` }
CreateInput for create key request
type CreditsInput ¶
type CreditsInput struct { OperationID string `json:"operationID,omitempty"` Credits float64 `json:"credits,omitempty"` Msg string `json:"msg,omitempty"` }
CreditsInput for add credits
type ErrField ¶
type ErrField struct {
Field, Msg string
}
ErrField error indicating input field problem
type Key ¶
type Key struct { ID string `json:"id,omitempty"` Key string `json:"key,omitempty"` Service string `json:"service,omitempty"` ValidTo *time.Time `json:"validTo,omitempty"` Disabled bool `json:"disabled,omitempty"` IPWhiteList string `json:"IPWhiteList,omitempty"` SaveRequests bool `json:"saveRequests,omitempty"` TotalCredits float64 `json:"totalCredits,omitempty"` UsedCredits float64 `json:"usedCredits,omitempty"` FailedCredits float64 `json:"failedCredits,omitempty"` Created *time.Time `json:"created,omitempty"` Updated *time.Time `json:"updated,omitempty"` LastUsed *time.Time `json:"lastUsed,omitempty"` LastIP string `json:"lastIP,omitempty"` }
Key structure for key data
Click to show internal directories.
Click to hide internal directories.