Documentation
¶
Index ¶
- Constants
- type DeleteFileRequest
- type DeleteFilesRequest
- type DeleteKeyValuePairEvent
- type DeletePairRequest
- type GetAllPairsRequest
- type GetFileRequest
- type GetFilesResponse
- type GetPairRequest
- type GetPairResponse
- type JSONError
- func NewAlreadyReportedError(description string, field ...string) *JSONError
- func NewBadRequestError(description string, field ...string) *JSONError
- func NewInternalServerError(description string, field ...string) *JSONError
- func NewNotFoundError(description string, field ...string) *JSONError
- func NewUnauthorizedError(description string, field ...string) *JSONError
- func NewUnprocessableEntityError(description string, field ...string) *JSONError
- type KeyValuePair
- type LoginRequest
- type LoginResponse
- type NewKeyValuePairEvent
- type PostPairRequest
- type SignUpRequest
- type TemplateData
- type Token
- type User
- type UserSignUpEvent
Constants ¶
View Source
const ( UserSignUpEventName = "userSignUp" NewKeyValuePairEventName = "newKeyValuePair" DeleteKeyValuePairEventName = "deleteKeyValuePair" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DeleteFileRequest ¶
type DeleteFileRequest struct {
Key string `json:"key"`
}
type DeleteFilesRequest ¶
type DeleteFilesRequest struct {
Prefix *string `json:"prefix,omitempty"`
}
type DeleteKeyValuePairEvent ¶
type DeleteKeyValuePairEvent struct {
Key string `json:"key"`
}
func (*DeleteKeyValuePairEvent) Name ¶
func (e *DeleteKeyValuePairEvent) Name() string
type DeletePairRequest ¶
type DeletePairRequest struct {
Key string `form:"key" json:"key"`
}
type GetAllPairsRequest ¶
type GetAllPairsRequest struct {
}
type GetFileRequest ¶
type GetFileRequest struct {
FileName string `json:"file_name" form:"file_name"`
}
type GetFilesResponse ¶
type GetFilesResponse struct {
Key string `json:"key" csv:"Key" excel:"Key"`
LastModified *time.Time `json:"last_modified,omitempty" csv:"Last modified" excel:"Last modified"`
Size uint64 `json:"size" csv:"Size" excel:"Size"`
StorageClass string `json:"storage_class" csv:"Storage Class" excel:"Storage Class"`
}
type GetPairRequest ¶
type GetPairRequest struct {
Key string `form:"key" json:"key"`
}
type GetPairResponse ¶
type JSONError ¶
type JSONError struct {
StatusCode int `json:"status_code,omitempty"`
Description string `json:"description,omitempty"`
Field string `json:"field,omitempty"`
}
func NewAlreadyReportedError ¶
func NewBadRequestError ¶
func NewInternalServerError ¶
func NewNotFoundError ¶
func NewUnauthorizedError ¶
type KeyValuePair ¶
type KeyValuePair struct {
Key string `json:"key"`
Value interface{} `json:"value"`
}
type LoginRequest ¶
type LoginResponse ¶
type NewKeyValuePairEvent ¶
type NewKeyValuePairEvent struct {
Pairs []*KeyValuePair
}
func (*NewKeyValuePairEvent) Name ¶
func (e *NewKeyValuePairEvent) Name() string
type PostPairRequest ¶
type PostPairRequest struct {
KeyValuePair
}
type SignUpRequest ¶
type TemplateData ¶
type Token ¶
type Token struct {
AccessToken string
AccessTokenExpires int64
AccessUUID string
// RefreshToken is used to create new pairs of access and refresh tokens,
// typically when the access token has expired, so the user does not have to login in again.
RefreshToken string
RefreshTokenExpires int64
RefreshUUID string
}
type User ¶
type User struct {
ID int `json:"-"`
Name string `json:"name"`
Email string `json:"email"`
Password string `json:"-"`
QRSecret *string `json:"-"`
}
func (*User) CheckPassword ¶
func (*User) HashPassword ¶
type UserSignUpEvent ¶
func (*UserSignUpEvent) Name ¶
func (e *UserSignUpEvent) Name() string
Name returns the event's name
Click to show internal directories.
Click to hide internal directories.