Documentation
¶
Index ¶
- Constants
- type AuthenticatedRequest
- type Body
- type KeysetBasedList
- type OffsetBasedList
- type Option
- type Request
- type StandardRequest
- func (r *StandardRequest) GetBody() Body
- func (r *StandardRequest) GetClient() string
- func (r *StandardRequest) GetContext() context.Context
- func (r *StandardRequest) GetID() string
- func (r *StandardRequest) GetIP() string
- func (r *StandardRequest) SetBody(body Body)
- func (r *StandardRequest) SetContext(ctx context.Context)
Constants ¶
View Source
const MAX_PAGE_SIZE = 1000
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthenticatedRequest ¶ added in v1.2.0
type AuthenticatedRequest struct {
StandardRequest
APIKey string
APISecret string
}
func NewAuthenticated ¶ added in v1.2.0
func NewAuthenticated(header http.Header, ip string, opts ...Option) AuthenticatedRequest
func (*AuthenticatedRequest) VerifyAPIHeaders ¶ added in v1.2.0
func (r *AuthenticatedRequest) VerifyAPIHeaders() error
type KeysetBasedList ¶ added in v1.1.1
type KeysetBasedList struct {
Limit int `json:"limit"`
LastValue interface{} `json:"last_value"`
DateFilters []relational.DateFilter `json:"date_filters"`
}
func (*KeysetBasedList) ParseDatesToUnix ¶ added in v1.1.1
func (r *KeysetBasedList) ParseDatesToUnix(validDBColumns []string) error
func (*KeysetBasedList) Validate ¶ added in v1.1.1
func (r *KeysetBasedList) Validate() error
type OffsetBasedList ¶ added in v1.1.1
type OffsetBasedList struct {
Limit int `json:"limit"`
Offset int `json:"offset"`
DateFilters []relational.DateFilter `json:"date_filters"`
}
func (*OffsetBasedList) ParseDatesToUnix ¶ added in v1.1.1
func (r *OffsetBasedList) ParseDatesToUnix(validDBColumns []string) error
func (*OffsetBasedList) Validate ¶ added in v1.1.1
func (r *OffsetBasedList) Validate() error
type Option ¶ added in v1.1.2
type Option func(*StandardRequest)
Option is a function that modifies the Request.
func WithTimeout ¶ added in v1.1.2
WithTimeout returns an Option that sets the timeout for the request context.
type Request ¶
type StandardRequest ¶ added in v1.2.0
type StandardRequest struct {
ID string
IP string
Client string
Body Body
Context context.Context
Cancel context.CancelFunc
}
func (*StandardRequest) GetBody ¶ added in v1.2.0
func (r *StandardRequest) GetBody() Body
func (*StandardRequest) GetClient ¶ added in v1.2.0
func (r *StandardRequest) GetClient() string
func (*StandardRequest) GetContext ¶ added in v1.2.0
func (r *StandardRequest) GetContext() context.Context
func (*StandardRequest) GetID ¶ added in v1.2.0
func (r *StandardRequest) GetID() string
func (*StandardRequest) GetIP ¶ added in v1.2.0
func (r *StandardRequest) GetIP() string
func (*StandardRequest) SetBody ¶ added in v1.2.0
func (r *StandardRequest) SetBody(body Body)
func (*StandardRequest) SetContext ¶ added in v1.2.0
func (r *StandardRequest) SetContext(ctx context.Context)
Click to show internal directories.
Click to hide internal directories.