v1

package
v0.0.0-...-24a8c69 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 29, 2020 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	InvalidRequestMsg      = "invalid request"
	NotFoundMsg            = "not found"
	InternalServerErrorMsg = "internal server error"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ErrorResponse

type ErrorResponse struct {
	Message string `json:"message"`
}

ErrorResponse represents http error response.

func NewErrorResponse

func NewErrorResponse(msg string) *ErrorResponse

NewErrorResponse returns custom error response.

func NewInternalServerError

func NewInternalServerError() *ErrorResponse

NewInternalServerError returns internal server error response.

func NewInvalidRequestError

func NewInvalidRequestError() *ErrorResponse

NewInvalidRequestError returns invalid request error response.

func NewNotFoundError

func NewNotFoundError() *ErrorResponse

NewNotFoundError returns not found error response.

type TweetsResponse

type TweetsResponse = storage.Tweets

TweetsResponse represents a tweets response.

type TweetsURLValues

type TweetsURLValues struct {
	AfterTime  time.Time `schema:"after_time"`
	BeforeTime time.Time `schema:"before_time"`
}

TweetsURLValues represents tweets URL query values.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL