api

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2021 License: AGPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const ExportOKCode int = 200

ExportOKCode is the HTTP code returned for type ExportOK

View Source
const FrontendMetaOKCode int = 200

FrontendMetaOKCode is the HTTP code returned for type FrontendMetaOK

View Source
const ImportOKCode int = 200

ImportOKCode is the HTTP code returned for type ImportOK

View Source
const ShortenedDeleteOKCode int = 200

ShortenedDeleteOKCode is the HTTP code returned for type ShortenedDeleteOK

View Source
const ShortenedPrefixOKCode int = 200

ShortenedPrefixOKCode is the HTTP code returned for type ShortenedPrefixOK

View Source
const ShortenedSummaryOKCode int = 200

ShortenedSummaryOKCode is the HTTP code returned for type ShortenedSummaryOK

View Source
const TerseReadOKCode int = 200

TerseReadOKCode is the HTTP code returned for type TerseReadOK

View Source
const TerseWriteOKCode int = 200

TerseWriteOKCode is the HTTP code returned for type TerseWriteOK

View Source
const VisitsDeleteOKCode int = 200

VisitsDeleteOKCode is the HTTP code returned for type VisitsDeleteOK

View Source
const VisitsReadOKCode int = 200

VisitsReadOKCode is the HTTP code returned for type VisitsReadOK

Variables

This section is empty.

Functions

This section is empty.

Types

type Export added in v0.0.3

type Export struct {
	Context *middleware.Context
	Handler ExportHandler
}
Export swagger:route POST /api/export api export

Export Terse and Visits data for the given shortened URLs.

Export Terse and Visits data for the given shortened URLs. If shortenedURLs is null, then export all shortened URLs.

func NewExport added in v0.0.3

func NewExport(ctx *middleware.Context, handler ExportHandler) *Export

NewExport creates a new http.Handler for the export operation

func (*Export) ServeHTTP added in v0.0.3

func (o *Export) ServeHTTP(rw http.ResponseWriter, r *http.Request)

type ExportDefault added in v0.0.3

type ExportDefault struct {

	/*
	  In: Body
	*/
	Payload *models.Error `json:"body,omitempty"`
	// contains filtered or unexported fields
}

ExportDefault Unexpected error.

swagger:response exportDefault

func NewExportDefault added in v0.0.3

func NewExportDefault(code int) *ExportDefault

NewExportDefault creates ExportDefault with default headers values

func (*ExportDefault) SetPayload added in v0.0.3

func (o *ExportDefault) SetPayload(payload *models.Error)

SetPayload sets the payload to the export default response

func (*ExportDefault) SetStatusCode added in v0.0.3

func (o *ExportDefault) SetStatusCode(code int)

SetStatusCode sets the status to the export default response

func (*ExportDefault) WithPayload added in v0.0.3

func (o *ExportDefault) WithPayload(payload *models.Error) *ExportDefault

WithPayload adds the payload to the export default response

func (*ExportDefault) WithStatusCode added in v0.0.3

func (o *ExportDefault) WithStatusCode(code int) *ExportDefault

WithStatusCode adds the status to the export default response

func (*ExportDefault) WriteResponse added in v0.0.3

func (o *ExportDefault) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)

WriteResponse to the client

type ExportHandler added in v0.0.3

type ExportHandler interface {
	Handle(ExportParams, *models.Principal) middleware.Responder
}

ExportHandler interface for that can handle valid export params

type ExportHandlerFunc added in v0.0.3

type ExportHandlerFunc func(ExportParams, *models.Principal) middleware.Responder

ExportHandlerFunc turns a function with the right signature into a export handler

func (ExportHandlerFunc) Handle added in v0.0.3

func (fn ExportHandlerFunc) Handle(params ExportParams, principal *models.Principal) middleware.Responder

Handle executing the request and returning a response

type ExportOK added in v0.0.3

type ExportOK struct {

	/*
	  In: Body
	*/
	Payload map[string]*models.Export `json:"body,omitempty"`
}

ExportOK The export was successfully retrieved.

swagger:response exportOK

func NewExportOK added in v0.0.3

func NewExportOK() *ExportOK

NewExportOK creates ExportOK with default headers values

func (*ExportOK) SetPayload added in v0.0.3

func (o *ExportOK) SetPayload(payload map[string]*models.Export)

SetPayload sets the payload to the export o k response

func (*ExportOK) WithPayload added in v0.0.3

func (o *ExportOK) WithPayload(payload map[string]*models.Export) *ExportOK

WithPayload adds the payload to the export o k response

func (*ExportOK) WriteResponse added in v0.0.3

func (o *ExportOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)

WriteResponse to the client

type ExportParams added in v0.0.3

type ExportParams struct {

	// HTTP Request Object
	HTTPRequest *http.Request `json:"-"`

	/*The shortened URLs to get the export for. If null, an export of all shortened URLs will be given.
	  In: body
	*/
	ShortenedURLs []string
}

ExportParams contains all the bound params for the export operation typically these are obtained from a http.Request

swagger:parameters export

func NewExportParams added in v0.0.3

func NewExportParams() ExportParams

NewExportParams creates a new ExportParams object

There are no default values defined in the spec.

func (*ExportParams) BindRequest added in v0.0.3

func (o *ExportParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error

BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface for simple values it will use straight method calls.

To ensure default values, the struct must have been initialized with NewExportParams() beforehand.

type ExportURL added in v0.0.3

type ExportURL struct {
	// contains filtered or unexported fields
}

ExportURL generates an URL for the export operation

func (*ExportURL) Build added in v0.0.3

func (o *ExportURL) Build() (*url.URL, error)

Build a url path and query string

func (*ExportURL) BuildFull added in v0.0.3

func (o *ExportURL) BuildFull(scheme, host string) (*url.URL, error)

BuildFull builds a full url with scheme, host, path and query string

func (*ExportURL) Must added in v0.0.3

func (o *ExportURL) Must(u *url.URL, err error) *url.URL

Must is a helper function to panic when the url builder returns an error

func (*ExportURL) SetBasePath added in v0.0.3

func (o *ExportURL) SetBasePath(bp string)

SetBasePath sets the base path for this url builder, only required when it's different from the base path specified in the swagger spec. When the value of the base path is an empty string

func (*ExportURL) String added in v0.0.3

func (o *ExportURL) String() string

String returns the string representation of the path with query string

func (*ExportURL) StringFull added in v0.0.3

func (o *ExportURL) StringFull(scheme, host string) string

StringFull returns the string representation of a complete url

func (*ExportURL) WithBasePath added in v0.0.3

func (o *ExportURL) WithBasePath(bp string) *ExportURL

WithBasePath sets the base path for this url builder, only required when it's different from the base path specified in the swagger spec. When the value of the base path is an empty string

type FrontendMeta added in v0.0.3

type FrontendMeta struct {
	Context *middleware.Context
	Handler FrontendMetaHandler
}
FrontendMeta swagger:route POST /api/frontend/meta api frontendMeta

Used by the frontend to inherit HTML meta for social media link previews.

This endpoint is intended for use only by the frontend. It will perform an HTTP GET request to the originalURL, extract all meta tag information for social media link previews, then return it.

func NewFrontendMeta added in v0.0.3

func NewFrontendMeta(ctx *middleware.Context, handler FrontendMetaHandler) *FrontendMeta

NewFrontendMeta creates a new http.Handler for the frontend meta operation

func (*FrontendMeta) ServeHTTP added in v0.0.3

func (o *FrontendMeta) ServeHTTP(rw http.ResponseWriter, r *http.Request)

type FrontendMetaDefault added in v0.0.3

type FrontendMetaDefault struct {

	/*
	  In: Body
	*/
	Payload *models.Error `json:"body,omitempty"`
	// contains filtered or unexported fields
}

FrontendMetaDefault Unexpected error.

swagger:response frontendMetaDefault

func NewFrontendMetaDefault added in v0.0.3

func NewFrontendMetaDefault(code int) *FrontendMetaDefault

NewFrontendMetaDefault creates FrontendMetaDefault with default headers values

func (*FrontendMetaDefault) SetPayload added in v0.0.3

func (o *FrontendMetaDefault) SetPayload(payload *models.Error)

SetPayload sets the payload to the frontend meta default response

func (*FrontendMetaDefault) SetStatusCode added in v0.0.3

func (o *FrontendMetaDefault) SetStatusCode(code int)

SetStatusCode sets the status to the frontend meta default response

func (*FrontendMetaDefault) WithPayload added in v0.0.3

func (o *FrontendMetaDefault) WithPayload(payload *models.Error) *FrontendMetaDefault

WithPayload adds the payload to the frontend meta default response

func (*FrontendMetaDefault) WithStatusCode added in v0.0.3

func (o *FrontendMetaDefault) WithStatusCode(code int) *FrontendMetaDefault

WithStatusCode adds the status to the frontend meta default response

func (*FrontendMetaDefault) WriteResponse added in v0.0.3

func (o *FrontendMetaDefault) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)

WriteResponse to the client

type FrontendMetaHandler added in v0.0.3

type FrontendMetaHandler interface {
	Handle(FrontendMetaParams, *models.Principal) middleware.Responder
}

FrontendMetaHandler interface for that can handle valid frontend meta params

type FrontendMetaHandlerFunc added in v0.0.3

type FrontendMetaHandlerFunc func(FrontendMetaParams, *models.Principal) middleware.Responder

FrontendMetaHandlerFunc turns a function with the right signature into a frontend meta handler

func (FrontendMetaHandlerFunc) Handle added in v0.0.3

Handle executing the request and returning a response

type FrontendMetaOK added in v0.0.3

type FrontendMetaOK struct {

	/*
	  In: Body
	*/
	Payload *FrontendMetaOKBody `json:"body,omitempty"`
}

FrontendMetaOK The relevant HTML meta tag information.

swagger:response frontendMetaOK

func NewFrontendMetaOK added in v0.0.3

func NewFrontendMetaOK() *FrontendMetaOK

NewFrontendMetaOK creates FrontendMetaOK with default headers values

func (*FrontendMetaOK) SetPayload added in v0.0.3

func (o *FrontendMetaOK) SetPayload(payload *FrontendMetaOKBody)

SetPayload sets the payload to the frontend meta o k response

func (*FrontendMetaOK) WithPayload added in v0.0.3

func (o *FrontendMetaOK) WithPayload(payload *FrontendMetaOKBody) *FrontendMetaOK

WithPayload adds the payload to the frontend meta o k response

func (*FrontendMetaOK) WriteResponse added in v0.0.3

func (o *FrontendMetaOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)

WriteResponse to the client

type FrontendMetaOKBody added in v0.0.3

type FrontendMetaOKBody struct {

	// og
	Og models.OpenGraph `json:"og,omitempty"`

	// twitter
	Twitter models.Twitter `json:"twitter,omitempty"`
}

FrontendMetaOKBody frontend meta o k body

swagger:model FrontendMetaOKBody

func (*FrontendMetaOKBody) ContextValidate added in v0.0.3

func (o *FrontendMetaOKBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this frontend meta o k body based on the context it is used

func (*FrontendMetaOKBody) MarshalBinary added in v0.0.3

func (o *FrontendMetaOKBody) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*FrontendMetaOKBody) UnmarshalBinary added in v0.0.3

func (o *FrontendMetaOKBody) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*FrontendMetaOKBody) Validate added in v0.0.3

func (o *FrontendMetaOKBody) Validate(formats strfmt.Registry) error

Validate validates this frontend meta o k body

type FrontendMetaParams added in v0.0.3

type FrontendMetaParams struct {

	// HTTP Request Object
	HTTPRequest *http.Request `json:"-"`

	/*The original URL to HTTP GET and extract the relevant HTML meta from for social media link previews.
	  Required: true
	  In: body
	*/
	OriginalURL string
}

FrontendMetaParams contains all the bound params for the frontend meta operation typically these are obtained from a http.Request

swagger:parameters frontendMeta

func NewFrontendMetaParams added in v0.0.3

func NewFrontendMetaParams() FrontendMetaParams

NewFrontendMetaParams creates a new FrontendMetaParams object

There are no default values defined in the spec.

func (*FrontendMetaParams) BindRequest added in v0.0.3

func (o *FrontendMetaParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error

BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface for simple values it will use straight method calls.

To ensure default values, the struct must have been initialized with NewFrontendMetaParams() beforehand.

type FrontendMetaURL added in v0.0.3

type FrontendMetaURL struct {
	// contains filtered or unexported fields
}

FrontendMetaURL generates an URL for the frontend meta operation

func (*FrontendMetaURL) Build added in v0.0.3

func (o *FrontendMetaURL) Build() (*url.URL, error)

Build a url path and query string

func (*FrontendMetaURL) BuildFull added in v0.0.3

func (o *FrontendMetaURL) BuildFull(scheme, host string) (*url.URL, error)

BuildFull builds a full url with scheme, host, path and query string

func (*FrontendMetaURL) Must added in v0.0.3

func (o *FrontendMetaURL) Must(u *url.URL, err error) *url.URL

Must is a helper function to panic when the url builder returns an error

func (*FrontendMetaURL) SetBasePath added in v0.0.3

func (o *FrontendMetaURL) SetBasePath(bp string)

SetBasePath sets the base path for this url builder, only required when it's different from the base path specified in the swagger spec. When the value of the base path is an empty string

func (*FrontendMetaURL) String added in v0.0.3

func (o *FrontendMetaURL) String() string

String returns the string representation of the path with query string

func (*FrontendMetaURL) StringFull added in v0.0.3

func (o *FrontendMetaURL) StringFull(scheme, host string) string

StringFull returns the string representation of a complete url

func (*FrontendMetaURL) WithBasePath added in v0.0.3

func (o *FrontendMetaURL) WithBasePath(bp string) *FrontendMetaURL

WithBasePath sets the base path for this url builder, only required when it's different from the base path specified in the swagger spec. When the value of the base path is an empty string

type Import added in v0.0.3

type Import struct {
	Context *middleware.Context
	Handler ImportHandler
}
Import swagger:route POST /api/import api import

Import existing Terse and Visits data for the given shortened URLs.

Any imported data will overwrite existing data. Unless deletion information is specified. In that case all Terse or Visits data can be deleted before importing the new data.

func NewImport added in v0.0.3

func NewImport(ctx *middleware.Context, handler ImportHandler) *Import

NewImport creates a new http.Handler for the import operation

func (*Import) ServeHTTP added in v0.0.3

func (o *Import) ServeHTTP(rw http.ResponseWriter, r *http.Request)

type ImportDefault added in v0.0.3

type ImportDefault struct {

	/*
	  In: Body
	*/
	Payload *models.Error `json:"body,omitempty"`
	// contains filtered or unexported fields
}

ImportDefault Unexpected error.

swagger:response importDefault

func NewImportDefault added in v0.0.3

func NewImportDefault(code int) *ImportDefault

NewImportDefault creates ImportDefault with default headers values

func (*ImportDefault) SetPayload added in v0.0.3

func (o *ImportDefault) SetPayload(payload *models.Error)

SetPayload sets the payload to the import default response

func (*ImportDefault) SetStatusCode added in v0.0.3

func (o *ImportDefault) SetStatusCode(code int)

SetStatusCode sets the status to the import default response

func (*ImportDefault) WithPayload added in v0.0.3

func (o *ImportDefault) WithPayload(payload *models.Error) *ImportDefault

WithPayload adds the payload to the import default response

func (*ImportDefault) WithStatusCode added in v0.0.3

func (o *ImportDefault) WithStatusCode(code int) *ImportDefault

WithStatusCode adds the status to the import default response

func (*ImportDefault) WriteResponse added in v0.0.3

func (o *ImportDefault) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)

WriteResponse to the client

type ImportHandler added in v0.0.3

type ImportHandler interface {
	Handle(ImportParams, *models.Principal) middleware.Responder
}

ImportHandler interface for that can handle valid import params

type ImportHandlerFunc added in v0.0.3

type ImportHandlerFunc func(ImportParams, *models.Principal) middleware.Responder

ImportHandlerFunc turns a function with the right signature into a import handler

func (ImportHandlerFunc) Handle added in v0.0.3

func (fn ImportHandlerFunc) Handle(params ImportParams, principal *models.Principal) middleware.Responder

Handle executing the request and returning a response

type ImportOK added in v0.0.3

type ImportOK struct {
}

ImportOK The import request was successfully fulfilled.

swagger:response importOK

func NewImportOK added in v0.0.3

func NewImportOK() *ImportOK

NewImportOK creates ImportOK with default headers values

func (*ImportOK) WriteResponse added in v0.0.3

func (o *ImportOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)

WriteResponse to the client

type ImportParams added in v0.0.3

type ImportParams struct {

	// HTTP Request Object
	HTTPRequest *http.Request `json:"-"`

	/*A JSON object containing the deletion information. If Terse or Visits data are marked for deletion, it will all be deleted. An object matching shortened URLs to their previously exported data are also required.
	  Required: true
	  In: body
	*/
	Import map[string]*models.Export
}

ImportParams contains all the bound params for the import operation typically these are obtained from a http.Request

swagger:parameters import

func NewImportParams added in v0.0.3

func NewImportParams() ImportParams

NewImportParams creates a new ImportParams object

There are no default values defined in the spec.

func (*ImportParams) BindRequest added in v0.0.3

func (o *ImportParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error

BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface for simple values it will use straight method calls.

To ensure default values, the struct must have been initialized with NewImportParams() beforehand.

type ImportURL added in v0.0.3

type ImportURL struct {
	// contains filtered or unexported fields
}

ImportURL generates an URL for the import operation

func (*ImportURL) Build added in v0.0.3

func (o *ImportURL) Build() (*url.URL, error)

Build a url path and query string

func (*ImportURL) BuildFull added in v0.0.3

func (o *ImportURL) BuildFull(scheme, host string) (*url.URL, error)

BuildFull builds a full url with scheme, host, path and query string

func (*ImportURL) Must added in v0.0.3

func (o *ImportURL) Must(u *url.URL, err error) *url.URL

Must is a helper function to panic when the url builder returns an error

func (*ImportURL) SetBasePath added in v0.0.3

func (o *ImportURL) SetBasePath(bp string)

SetBasePath sets the base path for this url builder, only required when it's different from the base path specified in the swagger spec. When the value of the base path is an empty string

func (*ImportURL) String added in v0.0.3

func (o *ImportURL) String() string

String returns the string representation of the path with query string

func (*ImportURL) StringFull added in v0.0.3

func (o *ImportURL) StringFull(scheme, host string) string

StringFull returns the string representation of a complete url

func (*ImportURL) WithBasePath added in v0.0.3

func (o *ImportURL) WithBasePath(bp string) *ImportURL

WithBasePath sets the base path for this url builder, only required when it's different from the base path specified in the swagger spec. When the value of the base path is an empty string

type ShortenedDelete added in v0.0.3

type ShortenedDelete struct {
	Context *middleware.Context
	Handler ShortenedDeleteHandler
}
ShortenedDelete swagger:route DELETE /api/shortened api shortenedDelete

Delete all assets for the given shortened URLs.

Delete all assets for the given shortened URLs. This includes all Terse data, Visits data, and Summary data.

func NewShortenedDelete added in v0.0.3

func NewShortenedDelete(ctx *middleware.Context, handler ShortenedDeleteHandler) *ShortenedDelete

NewShortenedDelete creates a new http.Handler for the shortened delete operation

func (*ShortenedDelete) ServeHTTP added in v0.0.3

func (o *ShortenedDelete) ServeHTTP(rw http.ResponseWriter, r *http.Request)

type ShortenedDeleteDefault added in v0.0.3

type ShortenedDeleteDefault struct {

	/*
	  In: Body
	*/
	Payload *models.Error `json:"body,omitempty"`
	// contains filtered or unexported fields
}

ShortenedDeleteDefault Unexpected error.

swagger:response shortenedDeleteDefault

func NewShortenedDeleteDefault added in v0.0.3

func NewShortenedDeleteDefault(code int) *ShortenedDeleteDefault

NewShortenedDeleteDefault creates ShortenedDeleteDefault with default headers values

func (*ShortenedDeleteDefault) SetPayload added in v0.0.3

func (o *ShortenedDeleteDefault) SetPayload(payload *models.Error)

SetPayload sets the payload to the shortened delete default response

func (*ShortenedDeleteDefault) SetStatusCode added in v0.0.3

func (o *ShortenedDeleteDefault) SetStatusCode(code int)

SetStatusCode sets the status to the shortened delete default response

func (*ShortenedDeleteDefault) WithPayload added in v0.0.3

func (o *ShortenedDeleteDefault) WithPayload(payload *models.Error) *ShortenedDeleteDefault

WithPayload adds the payload to the shortened delete default response

func (*ShortenedDeleteDefault) WithStatusCode added in v0.0.3

func (o *ShortenedDeleteDefault) WithStatusCode(code int) *ShortenedDeleteDefault

WithStatusCode adds the status to the shortened delete default response

func (*ShortenedDeleteDefault) WriteResponse added in v0.0.3

func (o *ShortenedDeleteDefault) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)

WriteResponse to the client

type ShortenedDeleteHandler added in v0.0.3

type ShortenedDeleteHandler interface {
	Handle(ShortenedDeleteParams, *models.Principal) middleware.Responder
}

ShortenedDeleteHandler interface for that can handle valid shortened delete params

type ShortenedDeleteHandlerFunc added in v0.0.3

type ShortenedDeleteHandlerFunc func(ShortenedDeleteParams, *models.Principal) middleware.Responder

ShortenedDeleteHandlerFunc turns a function with the right signature into a shortened delete handler

func (ShortenedDeleteHandlerFunc) Handle added in v0.0.3

Handle executing the request and returning a response

type ShortenedDeleteOK added in v0.0.3

type ShortenedDeleteOK struct {
}

ShortenedDeleteOK The shortened URL's data was successfully deleted from the backend storage.

swagger:response shortenedDeleteOK

func NewShortenedDeleteOK added in v0.0.3

func NewShortenedDeleteOK() *ShortenedDeleteOK

NewShortenedDeleteOK creates ShortenedDeleteOK with default headers values

func (*ShortenedDeleteOK) WriteResponse added in v0.0.3

func (o *ShortenedDeleteOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)

WriteResponse to the client

type ShortenedDeleteParams added in v0.0.3

type ShortenedDeleteParams struct {

	// HTTP Request Object
	HTTPRequest *http.Request `json:"-"`

	/*The shortened URLs whose data should be deleted.
	  Required: true
	  In: body
	*/
	ShortenedURLs []string
}

ShortenedDeleteParams contains all the bound params for the shortened delete operation typically these are obtained from a http.Request

swagger:parameters shortenedDelete

func NewShortenedDeleteParams added in v0.0.3

func NewShortenedDeleteParams() ShortenedDeleteParams

NewShortenedDeleteParams creates a new ShortenedDeleteParams object

There are no default values defined in the spec.

func (*ShortenedDeleteParams) BindRequest added in v0.0.3

func (o *ShortenedDeleteParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error

BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface for simple values it will use straight method calls.

To ensure default values, the struct must have been initialized with NewShortenedDeleteParams() beforehand.

type ShortenedDeleteURL added in v0.0.3

type ShortenedDeleteURL struct {
	// contains filtered or unexported fields
}

ShortenedDeleteURL generates an URL for the shortened delete operation

func (*ShortenedDeleteURL) Build added in v0.0.3

func (o *ShortenedDeleteURL) Build() (*url.URL, error)

Build a url path and query string

func (*ShortenedDeleteURL) BuildFull added in v0.0.3

func (o *ShortenedDeleteURL) BuildFull(scheme, host string) (*url.URL, error)

BuildFull builds a full url with scheme, host, path and query string

func (*ShortenedDeleteURL) Must added in v0.0.3

func (o *ShortenedDeleteURL) Must(u *url.URL, err error) *url.URL

Must is a helper function to panic when the url builder returns an error

func (*ShortenedDeleteURL) SetBasePath added in v0.0.3

func (o *ShortenedDeleteURL) SetBasePath(bp string)

SetBasePath sets the base path for this url builder, only required when it's different from the base path specified in the swagger spec. When the value of the base path is an empty string

func (*ShortenedDeleteURL) String added in v0.0.3

func (o *ShortenedDeleteURL) String() string

String returns the string representation of the path with query string

func (*ShortenedDeleteURL) StringFull added in v0.0.3

func (o *ShortenedDeleteURL) StringFull(scheme, host string) string

StringFull returns the string representation of a complete url

func (*ShortenedDeleteURL) WithBasePath added in v0.0.3

func (o *ShortenedDeleteURL) WithBasePath(bp string) *ShortenedDeleteURL

WithBasePath sets the base path for this url builder, only required when it's different from the base path specified in the swagger spec. When the value of the base path is an empty string

type ShortenedPrefix added in v0.0.3

type ShortenedPrefix struct {
	Context *middleware.Context
	Handler ShortenedPrefixHandler
}
ShortenedPrefix swagger:route GET /api/prefix api shortenedPrefix

Client's web browser is requesting what HTTP prefix all shortened URLs have.

Provides the HTTP prefix all shortened URLs have.

func NewShortenedPrefix added in v0.0.3

func NewShortenedPrefix(ctx *middleware.Context, handler ShortenedPrefixHandler) *ShortenedPrefix

NewShortenedPrefix creates a new http.Handler for the shortened prefix operation

func (*ShortenedPrefix) ServeHTTP added in v0.0.3

func (o *ShortenedPrefix) ServeHTTP(rw http.ResponseWriter, r *http.Request)

type ShortenedPrefixDefault added in v0.0.3

type ShortenedPrefixDefault struct {

	/*
	  In: Body
	*/
	Payload *models.Error `json:"body,omitempty"`
	// contains filtered or unexported fields
}

ShortenedPrefixDefault Unexpected error.

swagger:response shortenedPrefixDefault

func NewShortenedPrefixDefault added in v0.0.3

func NewShortenedPrefixDefault(code int) *ShortenedPrefixDefault

NewShortenedPrefixDefault creates ShortenedPrefixDefault with default headers values

func (*ShortenedPrefixDefault) SetPayload added in v0.0.3

func (o *ShortenedPrefixDefault) SetPayload(payload *models.Error)

SetPayload sets the payload to the shortened prefix default response

func (*ShortenedPrefixDefault) SetStatusCode added in v0.0.3

func (o *ShortenedPrefixDefault) SetStatusCode(code int)

SetStatusCode sets the status to the shortened prefix default response

func (*ShortenedPrefixDefault) WithPayload added in v0.0.3

func (o *ShortenedPrefixDefault) WithPayload(payload *models.Error) *ShortenedPrefixDefault

WithPayload adds the payload to the shortened prefix default response

func (*ShortenedPrefixDefault) WithStatusCode added in v0.0.3

func (o *ShortenedPrefixDefault) WithStatusCode(code int) *ShortenedPrefixDefault

WithStatusCode adds the status to the shortened prefix default response

func (*ShortenedPrefixDefault) WriteResponse added in v0.0.3

func (o *ShortenedPrefixDefault) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)

WriteResponse to the client

type ShortenedPrefixHandler added in v0.0.3

type ShortenedPrefixHandler interface {
	Handle(ShortenedPrefixParams, *models.Principal) middleware.Responder
}

ShortenedPrefixHandler interface for that can handle valid shortened prefix params

type ShortenedPrefixHandlerFunc added in v0.0.3

type ShortenedPrefixHandlerFunc func(ShortenedPrefixParams, *models.Principal) middleware.Responder

ShortenedPrefixHandlerFunc turns a function with the right signature into a shortened prefix handler

func (ShortenedPrefixHandlerFunc) Handle added in v0.0.3

Handle executing the request and returning a response

type ShortenedPrefixOK added in v0.0.3

type ShortenedPrefixOK struct {

	/*
	  In: Body
	*/
	Payload string `json:"body,omitempty"`
}

ShortenedPrefixOK The HTTP prefix all shortened URLs have.

swagger:response shortenedPrefixOK

func NewShortenedPrefixOK added in v0.0.3

func NewShortenedPrefixOK() *ShortenedPrefixOK

NewShortenedPrefixOK creates ShortenedPrefixOK with default headers values

func (*ShortenedPrefixOK) SetPayload added in v0.0.3

func (o *ShortenedPrefixOK) SetPayload(payload string)

SetPayload sets the payload to the shortened prefix o k response

func (*ShortenedPrefixOK) WithPayload added in v0.0.3

func (o *ShortenedPrefixOK) WithPayload(payload string) *ShortenedPrefixOK

WithPayload adds the payload to the shortened prefix o k response

func (*ShortenedPrefixOK) WriteResponse added in v0.0.3

func (o *ShortenedPrefixOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)

WriteResponse to the client

type ShortenedPrefixParams added in v0.0.3

type ShortenedPrefixParams struct {

	// HTTP Request Object
	HTTPRequest *http.Request `json:"-"`
}

ShortenedPrefixParams contains all the bound params for the shortened prefix operation typically these are obtained from a http.Request

swagger:parameters shortenedPrefix

func NewShortenedPrefixParams added in v0.0.3

func NewShortenedPrefixParams() ShortenedPrefixParams

NewShortenedPrefixParams creates a new ShortenedPrefixParams object

There are no default values defined in the spec.

func (*ShortenedPrefixParams) BindRequest added in v0.0.3

func (o *ShortenedPrefixParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error

BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface for simple values it will use straight method calls.

To ensure default values, the struct must have been initialized with NewShortenedPrefixParams() beforehand.

type ShortenedPrefixURL added in v0.0.3

type ShortenedPrefixURL struct {
	// contains filtered or unexported fields
}

ShortenedPrefixURL generates an URL for the shortened prefix operation

func (*ShortenedPrefixURL) Build added in v0.0.3

func (o *ShortenedPrefixURL) Build() (*url.URL, error)

Build a url path and query string

func (*ShortenedPrefixURL) BuildFull added in v0.0.3

func (o *ShortenedPrefixURL) BuildFull(scheme, host string) (*url.URL, error)

BuildFull builds a full url with scheme, host, path and query string

func (*ShortenedPrefixURL) Must added in v0.0.3

func (o *ShortenedPrefixURL) Must(u *url.URL, err error) *url.URL

Must is a helper function to panic when the url builder returns an error

func (*ShortenedPrefixURL) SetBasePath added in v0.0.3

func (o *ShortenedPrefixURL) SetBasePath(bp string)

SetBasePath sets the base path for this url builder, only required when it's different from the base path specified in the swagger spec. When the value of the base path is an empty string

func (*ShortenedPrefixURL) String added in v0.0.3

func (o *ShortenedPrefixURL) String() string

String returns the string representation of the path with query string

func (*ShortenedPrefixURL) StringFull added in v0.0.3

func (o *ShortenedPrefixURL) StringFull(scheme, host string) string

StringFull returns the string representation of a complete url

func (*ShortenedPrefixURL) WithBasePath added in v0.0.3

func (o *ShortenedPrefixURL) WithBasePath(bp string) *ShortenedPrefixURL

WithBasePath sets the base path for this url builder, only required when it's different from the base path specified in the swagger spec. When the value of the base path is an empty string

type ShortenedSummary added in v0.0.3

type ShortenedSummary struct {
	Context *middleware.Context
	Handler ShortenedSummaryHandler
}
ShortenedSummary swagger:route POST /api/summary api shortenedSummary

Provide Summary data for the requested shortened URLs.

Summary data includes the shortened URL, the original URL, the type of redirect, and the number of visits.

func NewShortenedSummary added in v0.0.3

func NewShortenedSummary(ctx *middleware.Context, handler ShortenedSummaryHandler) *ShortenedSummary

NewShortenedSummary creates a new http.Handler for the shortened summary operation

func (*ShortenedSummary) ServeHTTP added in v0.0.3

func (o *ShortenedSummary) ServeHTTP(rw http.ResponseWriter, r *http.Request)

type ShortenedSummaryDefault added in v0.0.3

type ShortenedSummaryDefault struct {

	/*
	  In: Body
	*/
	Payload *models.Error `json:"body,omitempty"`
	// contains filtered or unexported fields
}

ShortenedSummaryDefault Unexpected error.

swagger:response shortenedSummaryDefault

func NewShortenedSummaryDefault added in v0.0.3

func NewShortenedSummaryDefault(code int) *ShortenedSummaryDefault

NewShortenedSummaryDefault creates ShortenedSummaryDefault with default headers values

func (*ShortenedSummaryDefault) SetPayload added in v0.0.3

func (o *ShortenedSummaryDefault) SetPayload(payload *models.Error)

SetPayload sets the payload to the shortened summary default response

func (*ShortenedSummaryDefault) SetStatusCode added in v0.0.3

func (o *ShortenedSummaryDefault) SetStatusCode(code int)

SetStatusCode sets the status to the shortened summary default response

func (*ShortenedSummaryDefault) WithPayload added in v0.0.3

func (o *ShortenedSummaryDefault) WithPayload(payload *models.Error) *ShortenedSummaryDefault

WithPayload adds the payload to the shortened summary default response

func (*ShortenedSummaryDefault) WithStatusCode added in v0.0.3

func (o *ShortenedSummaryDefault) WithStatusCode(code int) *ShortenedSummaryDefault

WithStatusCode adds the status to the shortened summary default response

func (*ShortenedSummaryDefault) WriteResponse added in v0.0.3

func (o *ShortenedSummaryDefault) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)

WriteResponse to the client

type ShortenedSummaryHandler added in v0.0.3

type ShortenedSummaryHandler interface {
	Handle(ShortenedSummaryParams, *models.Principal) middleware.Responder
}

ShortenedSummaryHandler interface for that can handle valid shortened summary params

type ShortenedSummaryHandlerFunc added in v0.0.3

type ShortenedSummaryHandlerFunc func(ShortenedSummaryParams, *models.Principal) middleware.Responder

ShortenedSummaryHandlerFunc turns a function with the right signature into a shortened summary handler

func (ShortenedSummaryHandlerFunc) Handle added in v0.0.3

Handle executing the request and returning a response

type ShortenedSummaryOK added in v0.0.3

type ShortenedSummaryOK struct {

	/*
	  In: Body
	*/
	Payload map[string]*models.Summary `json:"body,omitempty"`
}

ShortenedSummaryOK The map of shortened URLs to Summary data.

swagger:response shortenedSummaryOK

func NewShortenedSummaryOK added in v0.0.3

func NewShortenedSummaryOK() *ShortenedSummaryOK

NewShortenedSummaryOK creates ShortenedSummaryOK with default headers values

func (*ShortenedSummaryOK) SetPayload added in v0.0.3

func (o *ShortenedSummaryOK) SetPayload(payload map[string]*models.Summary)

SetPayload sets the payload to the shortened summary o k response

func (*ShortenedSummaryOK) WithPayload added in v0.0.3

func (o *ShortenedSummaryOK) WithPayload(payload map[string]*models.Summary) *ShortenedSummaryOK

WithPayload adds the payload to the shortened summary o k response

func (*ShortenedSummaryOK) WriteResponse added in v0.0.3

func (o *ShortenedSummaryOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)

WriteResponse to the client

type ShortenedSummaryParams added in v0.0.3

type ShortenedSummaryParams struct {

	// HTTP Request Object
	HTTPRequest *http.Request `json:"-"`

	/*The array of shortened URLs to get Summary data for. If none is provided, all will summaries will be returned.
	  In: body
	*/
	ShortenedURLs []string
}

ShortenedSummaryParams contains all the bound params for the shortened summary operation typically these are obtained from a http.Request

swagger:parameters shortenedSummary

func NewShortenedSummaryParams added in v0.0.3

func NewShortenedSummaryParams() ShortenedSummaryParams

NewShortenedSummaryParams creates a new ShortenedSummaryParams object

There are no default values defined in the spec.

func (*ShortenedSummaryParams) BindRequest added in v0.0.3

func (o *ShortenedSummaryParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error

BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface for simple values it will use straight method calls.

To ensure default values, the struct must have been initialized with NewShortenedSummaryParams() beforehand.

type ShortenedSummaryURL added in v0.0.3

type ShortenedSummaryURL struct {
	// contains filtered or unexported fields
}

ShortenedSummaryURL generates an URL for the shortened summary operation

func (*ShortenedSummaryURL) Build added in v0.0.3

func (o *ShortenedSummaryURL) Build() (*url.URL, error)

Build a url path and query string

func (*ShortenedSummaryURL) BuildFull added in v0.0.3

func (o *ShortenedSummaryURL) BuildFull(scheme, host string) (*url.URL, error)

BuildFull builds a full url with scheme, host, path and query string

func (*ShortenedSummaryURL) Must added in v0.0.3

func (o *ShortenedSummaryURL) Must(u *url.URL, err error) *url.URL

Must is a helper function to panic when the url builder returns an error

func (*ShortenedSummaryURL) SetBasePath added in v0.0.3

func (o *ShortenedSummaryURL) SetBasePath(bp string)

SetBasePath sets the base path for this url builder, only required when it's different from the base path specified in the swagger spec. When the value of the base path is an empty string

func (*ShortenedSummaryURL) String added in v0.0.3

func (o *ShortenedSummaryURL) String() string

String returns the string representation of the path with query string

func (*ShortenedSummaryURL) StringFull added in v0.0.3

func (o *ShortenedSummaryURL) StringFull(scheme, host string) string

StringFull returns the string representation of a complete url

func (*ShortenedSummaryURL) WithBasePath added in v0.0.3

func (o *ShortenedSummaryURL) WithBasePath(bp string) *ShortenedSummaryURL

WithBasePath sets the base path for this url builder, only required when it's different from the base path specified in the swagger spec. When the value of the base path is an empty string

type TerseRead added in v0.0.3

type TerseRead struct {
	Context *middleware.Context
	Handler TerseReadHandler
}
TerseRead swagger:route POST /api/terse api terseRead

Read the Terse data for the given shortened URL.

Read the Terse data for the given shortened URL.

func NewTerseRead added in v0.0.3

func NewTerseRead(ctx *middleware.Context, handler TerseReadHandler) *TerseRead

NewTerseRead creates a new http.Handler for the terse read operation

func (*TerseRead) ServeHTTP added in v0.0.3

func (o *TerseRead) ServeHTTP(rw http.ResponseWriter, r *http.Request)

type TerseReadDefault added in v0.0.3

type TerseReadDefault struct {

	/*
	  In: Body
	*/
	Payload *models.Error `json:"body,omitempty"`
	// contains filtered or unexported fields
}

TerseReadDefault Unexpected error.

swagger:response terseReadDefault

func NewTerseReadDefault added in v0.0.3

func NewTerseReadDefault(code int) *TerseReadDefault

NewTerseReadDefault creates TerseReadDefault with default headers values

func (*TerseReadDefault) SetPayload added in v0.0.3

func (o *TerseReadDefault) SetPayload(payload *models.Error)

SetPayload sets the payload to the terse read default response

func (*TerseReadDefault) SetStatusCode added in v0.0.3

func (o *TerseReadDefault) SetStatusCode(code int)

SetStatusCode sets the status to the terse read default response

func (*TerseReadDefault) WithPayload added in v0.0.3

func (o *TerseReadDefault) WithPayload(payload *models.Error) *TerseReadDefault

WithPayload adds the payload to the terse read default response

func (*TerseReadDefault) WithStatusCode added in v0.0.3

func (o *TerseReadDefault) WithStatusCode(code int) *TerseReadDefault

WithStatusCode adds the status to the terse read default response

func (*TerseReadDefault) WriteResponse added in v0.0.3

func (o *TerseReadDefault) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)

WriteResponse to the client

type TerseReadHandler added in v0.0.3

type TerseReadHandler interface {
	Handle(TerseReadParams, *models.Principal) middleware.Responder
}

TerseReadHandler interface for that can handle valid terse read params

type TerseReadHandlerFunc added in v0.0.3

type TerseReadHandlerFunc func(TerseReadParams, *models.Principal) middleware.Responder

TerseReadHandlerFunc turns a function with the right signature into a terse read handler

func (TerseReadHandlerFunc) Handle added in v0.0.3

Handle executing the request and returning a response

type TerseReadOK added in v0.0.3

type TerseReadOK struct {

	/*
	  In: Body
	*/
	Payload map[string]*models.Terse `json:"body,omitempty"`
}

TerseReadOK The Terse data was successfully retrieved.

swagger:response terseReadOK

func NewTerseReadOK added in v0.0.3

func NewTerseReadOK() *TerseReadOK

NewTerseReadOK creates TerseReadOK with default headers values

func (*TerseReadOK) SetPayload added in v0.0.3

func (o *TerseReadOK) SetPayload(payload map[string]*models.Terse)

SetPayload sets the payload to the terse read o k response

func (*TerseReadOK) WithPayload added in v0.0.3

func (o *TerseReadOK) WithPayload(payload map[string]*models.Terse) *TerseReadOK

WithPayload adds the payload to the terse read o k response

func (*TerseReadOK) WriteResponse added in v0.0.3

func (o *TerseReadOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)

WriteResponse to the client

type TerseReadParams added in v0.0.3

type TerseReadParams struct {

	// HTTP Request Object
	HTTPRequest *http.Request `json:"-"`

	/*The shortened URLs to read the Terse data for.
	  Required: true
	  In: body
	*/
	ShortenedURLs []string
}

TerseReadParams contains all the bound params for the terse read operation typically these are obtained from a http.Request

swagger:parameters terseRead

func NewTerseReadParams added in v0.0.3

func NewTerseReadParams() TerseReadParams

NewTerseReadParams creates a new TerseReadParams object

There are no default values defined in the spec.

func (*TerseReadParams) BindRequest added in v0.0.3

func (o *TerseReadParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error

BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface for simple values it will use straight method calls.

To ensure default values, the struct must have been initialized with NewTerseReadParams() beforehand.

type TerseReadURL added in v0.0.3

type TerseReadURL struct {
	// contains filtered or unexported fields
}

TerseReadURL generates an URL for the terse read operation

func (*TerseReadURL) Build added in v0.0.3

func (o *TerseReadURL) Build() (*url.URL, error)

Build a url path and query string

func (*TerseReadURL) BuildFull added in v0.0.3

func (o *TerseReadURL) BuildFull(scheme, host string) (*url.URL, error)

BuildFull builds a full url with scheme, host, path and query string

func (*TerseReadURL) Must added in v0.0.3

func (o *TerseReadURL) Must(u *url.URL, err error) *url.URL

Must is a helper function to panic when the url builder returns an error

func (*TerseReadURL) SetBasePath added in v0.0.3

func (o *TerseReadURL) SetBasePath(bp string)

SetBasePath sets the base path for this url builder, only required when it's different from the base path specified in the swagger spec. When the value of the base path is an empty string

func (*TerseReadURL) String added in v0.0.3

func (o *TerseReadURL) String() string

String returns the string representation of the path with query string

func (*TerseReadURL) StringFull added in v0.0.3

func (o *TerseReadURL) StringFull(scheme, host string) string

StringFull returns the string representation of a complete url

func (*TerseReadURL) WithBasePath added in v0.0.3

func (o *TerseReadURL) WithBasePath(bp string) *TerseReadURL

WithBasePath sets the base path for this url builder, only required when it's different from the base path specified in the swagger spec. When the value of the base path is an empty string

type TerseWrite

type TerseWrite struct {
	Context *middleware.Context
	Handler TerseWriteHandler
}
TerseWrite swagger:route POST /api/write/{operation} api terseWrite

Perform a write operation on Terse data for a given shortened URL.

"insert" will fail if the shortened URL already exists. "update" will fail if the shortened URL does not already exist. "upsert" will only fail if there is a failure interacting with the underlying storage. If no shortened URL is included in the given Terse data, one will be generated randomly and returned in the response.

func NewTerseWrite

func NewTerseWrite(ctx *middleware.Context, handler TerseWriteHandler) *TerseWrite

NewTerseWrite creates a new http.Handler for the terse write operation

func (*TerseWrite) ServeHTTP

func (o *TerseWrite) ServeHTTP(rw http.ResponseWriter, r *http.Request)

type TerseWriteDefault

type TerseWriteDefault struct {

	/*
	  In: Body
	*/
	Payload *models.Error `json:"body,omitempty"`
	// contains filtered or unexported fields
}

TerseWriteDefault Unexpected error.

swagger:response terseWriteDefault

func NewTerseWriteDefault

func NewTerseWriteDefault(code int) *TerseWriteDefault

NewTerseWriteDefault creates TerseWriteDefault with default headers values

func (*TerseWriteDefault) SetPayload

func (o *TerseWriteDefault) SetPayload(payload *models.Error)

SetPayload sets the payload to the terse write default response

func (*TerseWriteDefault) SetStatusCode

func (o *TerseWriteDefault) SetStatusCode(code int)

SetStatusCode sets the status to the terse write default response

func (*TerseWriteDefault) WithPayload

func (o *TerseWriteDefault) WithPayload(payload *models.Error) *TerseWriteDefault

WithPayload adds the payload to the terse write default response

func (*TerseWriteDefault) WithStatusCode

func (o *TerseWriteDefault) WithStatusCode(code int) *TerseWriteDefault

WithStatusCode adds the status to the terse write default response

func (*TerseWriteDefault) WriteResponse

func (o *TerseWriteDefault) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)

WriteResponse to the client

type TerseWriteHandler

type TerseWriteHandler interface {
	Handle(TerseWriteParams, *models.Principal) middleware.Responder
}

TerseWriteHandler interface for that can handle valid terse write params

type TerseWriteHandlerFunc

type TerseWriteHandlerFunc func(TerseWriteParams, *models.Principal) middleware.Responder

TerseWriteHandlerFunc turns a function with the right signature into a terse write handler

func (TerseWriteHandlerFunc) Handle

Handle executing the request and returning a response

type TerseWriteOK

type TerseWriteOK struct {

	/*The shortened URL affected.
	  In: Body
	*/
	Payload map[string]*models.Terse `json:"body,omitempty"`
}

TerseWriteOK The map of shortened URLs to written Terse data.

swagger:response terseWriteOK

func NewTerseWriteOK

func NewTerseWriteOK() *TerseWriteOK

NewTerseWriteOK creates TerseWriteOK with default headers values

func (*TerseWriteOK) SetPayload

func (o *TerseWriteOK) SetPayload(payload map[string]*models.Terse)

SetPayload sets the payload to the terse write o k response

func (*TerseWriteOK) WithPayload

func (o *TerseWriteOK) WithPayload(payload map[string]*models.Terse) *TerseWriteOK

WithPayload adds the payload to the terse write o k response

func (*TerseWriteOK) WriteResponse

func (o *TerseWriteOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)

WriteResponse to the client

type TerseWriteParams

type TerseWriteParams struct {

	// HTTP Request Object
	HTTPRequest *http.Request `json:"-"`

	/*The write operation to perform with the Terse data.
	  Required: true
	  In: path
	*/
	Operation string
	/*The Terse data, with an optional shortened URL. If no shortened URL is given, one will be generated randomly and returned in the response. If no redirect type is given, 302 is used.
	  Required: true
	  In: body
	*/
	Terse []models.TerseInput
}

TerseWriteParams contains all the bound params for the terse write operation typically these are obtained from a http.Request

swagger:parameters terseWrite

func NewTerseWriteParams

func NewTerseWriteParams() TerseWriteParams

NewTerseWriteParams creates a new TerseWriteParams object

There are no default values defined in the spec.

func (*TerseWriteParams) BindRequest

func (o *TerseWriteParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error

BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface for simple values it will use straight method calls.

To ensure default values, the struct must have been initialized with NewTerseWriteParams() beforehand.

type TerseWriteURL

type TerseWriteURL struct {
	Operation string
	// contains filtered or unexported fields
}

TerseWriteURL generates an URL for the terse write operation

func (*TerseWriteURL) Build

func (o *TerseWriteURL) Build() (*url.URL, error)

Build a url path and query string

func (*TerseWriteURL) BuildFull

func (o *TerseWriteURL) BuildFull(scheme, host string) (*url.URL, error)

BuildFull builds a full url with scheme, host, path and query string

func (*TerseWriteURL) Must

func (o *TerseWriteURL) Must(u *url.URL, err error) *url.URL

Must is a helper function to panic when the url builder returns an error

func (*TerseWriteURL) SetBasePath

func (o *TerseWriteURL) SetBasePath(bp string)

SetBasePath sets the base path for this url builder, only required when it's different from the base path specified in the swagger spec. When the value of the base path is an empty string

func (*TerseWriteURL) String

func (o *TerseWriteURL) String() string

String returns the string representation of the path with query string

func (*TerseWriteURL) StringFull

func (o *TerseWriteURL) StringFull(scheme, host string) string

StringFull returns the string representation of a complete url

func (*TerseWriteURL) WithBasePath

func (o *TerseWriteURL) WithBasePath(bp string) *TerseWriteURL

WithBasePath sets the base path for this url builder, only required when it's different from the base path specified in the swagger spec. When the value of the base path is an empty string

type VisitsDelete added in v0.0.3

type VisitsDelete struct {
	Context *middleware.Context
	Handler VisitsDeleteHandler
}
VisitsDelete swagger:route DELETE /api/visits api visitsDelete

Delete all Visits data for the given shortened URLs.

Delete all Visits data for the given shortened URLs. This will affect Summary data.

func NewVisitsDelete added in v0.0.3

func NewVisitsDelete(ctx *middleware.Context, handler VisitsDeleteHandler) *VisitsDelete

NewVisitsDelete creates a new http.Handler for the visits delete operation

func (*VisitsDelete) ServeHTTP added in v0.0.3

func (o *VisitsDelete) ServeHTTP(rw http.ResponseWriter, r *http.Request)

type VisitsDeleteDefault added in v0.0.3

type VisitsDeleteDefault struct {

	/*
	  In: Body
	*/
	Payload *models.Error `json:"body,omitempty"`
	// contains filtered or unexported fields
}

VisitsDeleteDefault Unexpected error.

swagger:response visitsDeleteDefault

func NewVisitsDeleteDefault added in v0.0.3

func NewVisitsDeleteDefault(code int) *VisitsDeleteDefault

NewVisitsDeleteDefault creates VisitsDeleteDefault with default headers values

func (*VisitsDeleteDefault) SetPayload added in v0.0.3

func (o *VisitsDeleteDefault) SetPayload(payload *models.Error)

SetPayload sets the payload to the visits delete default response

func (*VisitsDeleteDefault) SetStatusCode added in v0.0.3

func (o *VisitsDeleteDefault) SetStatusCode(code int)

SetStatusCode sets the status to the visits delete default response

func (*VisitsDeleteDefault) WithPayload added in v0.0.3

func (o *VisitsDeleteDefault) WithPayload(payload *models.Error) *VisitsDeleteDefault

WithPayload adds the payload to the visits delete default response

func (*VisitsDeleteDefault) WithStatusCode added in v0.0.3

func (o *VisitsDeleteDefault) WithStatusCode(code int) *VisitsDeleteDefault

WithStatusCode adds the status to the visits delete default response

func (*VisitsDeleteDefault) WriteResponse added in v0.0.3

func (o *VisitsDeleteDefault) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)

WriteResponse to the client

type VisitsDeleteHandler added in v0.0.3

type VisitsDeleteHandler interface {
	Handle(VisitsDeleteParams, *models.Principal) middleware.Responder
}

VisitsDeleteHandler interface for that can handle valid visits delete params

type VisitsDeleteHandlerFunc added in v0.0.3

type VisitsDeleteHandlerFunc func(VisitsDeleteParams, *models.Principal) middleware.Responder

VisitsDeleteHandlerFunc turns a function with the right signature into a visits delete handler

func (VisitsDeleteHandlerFunc) Handle added in v0.0.3

Handle executing the request and returning a response

type VisitsDeleteOK added in v0.0.3

type VisitsDeleteOK struct {
}

VisitsDeleteOK The shortened URL's Visits data was successfully deleted from the backend storage.

swagger:response visitsDeleteOK

func NewVisitsDeleteOK added in v0.0.3

func NewVisitsDeleteOK() *VisitsDeleteOK

NewVisitsDeleteOK creates VisitsDeleteOK with default headers values

func (*VisitsDeleteOK) WriteResponse added in v0.0.3

func (o *VisitsDeleteOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)

WriteResponse to the client

type VisitsDeleteParams added in v0.0.3

type VisitsDeleteParams struct {

	// HTTP Request Object
	HTTPRequest *http.Request `json:"-"`

	/*The shortened URLs whose Visits data should be deleted.
	  Required: true
	  In: body
	*/
	ShortenedURLs []string
}

VisitsDeleteParams contains all the bound params for the visits delete operation typically these are obtained from a http.Request

swagger:parameters visitsDelete

func NewVisitsDeleteParams added in v0.0.3

func NewVisitsDeleteParams() VisitsDeleteParams

NewVisitsDeleteParams creates a new VisitsDeleteParams object

There are no default values defined in the spec.

func (*VisitsDeleteParams) BindRequest added in v0.0.3

func (o *VisitsDeleteParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error

BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface for simple values it will use straight method calls.

To ensure default values, the struct must have been initialized with NewVisitsDeleteParams() beforehand.

type VisitsDeleteURL added in v0.0.3

type VisitsDeleteURL struct {
	// contains filtered or unexported fields
}

VisitsDeleteURL generates an URL for the visits delete operation

func (*VisitsDeleteURL) Build added in v0.0.3

func (o *VisitsDeleteURL) Build() (*url.URL, error)

Build a url path and query string

func (*VisitsDeleteURL) BuildFull added in v0.0.3

func (o *VisitsDeleteURL) BuildFull(scheme, host string) (*url.URL, error)

BuildFull builds a full url with scheme, host, path and query string

func (*VisitsDeleteURL) Must added in v0.0.3

func (o *VisitsDeleteURL) Must(u *url.URL, err error) *url.URL

Must is a helper function to panic when the url builder returns an error

func (*VisitsDeleteURL) SetBasePath added in v0.0.3

func (o *VisitsDeleteURL) SetBasePath(bp string)

SetBasePath sets the base path for this url builder, only required when it's different from the base path specified in the swagger spec. When the value of the base path is an empty string

func (*VisitsDeleteURL) String added in v0.0.3

func (o *VisitsDeleteURL) String() string

String returns the string representation of the path with query string

func (*VisitsDeleteURL) StringFull added in v0.0.3

func (o *VisitsDeleteURL) StringFull(scheme, host string) string

StringFull returns the string representation of a complete url

func (*VisitsDeleteURL) WithBasePath added in v0.0.3

func (o *VisitsDeleteURL) WithBasePath(bp string) *VisitsDeleteURL

WithBasePath sets the base path for this url builder, only required when it's different from the base path specified in the swagger spec. When the value of the base path is an empty string

type VisitsRead added in v0.0.3

type VisitsRead struct {
	Context *middleware.Context
	Handler VisitsReadHandler
}
VisitsRead swagger:route POST /api/visits api visitsRead

Read the Visits data for the given shortened URLs.

Read the Visits data for the given shortened URLs.

func NewVisitsRead added in v0.0.3

func NewVisitsRead(ctx *middleware.Context, handler VisitsReadHandler) *VisitsRead

NewVisitsRead creates a new http.Handler for the visits read operation

func (*VisitsRead) ServeHTTP added in v0.0.3

func (o *VisitsRead) ServeHTTP(rw http.ResponseWriter, r *http.Request)

type VisitsReadDefault added in v0.0.3

type VisitsReadDefault struct {

	/*
	  In: Body
	*/
	Payload *models.Error `json:"body,omitempty"`
	// contains filtered or unexported fields
}

VisitsReadDefault Unexpected error.

swagger:response visitsReadDefault

func NewVisitsReadDefault added in v0.0.3

func NewVisitsReadDefault(code int) *VisitsReadDefault

NewVisitsReadDefault creates VisitsReadDefault with default headers values

func (*VisitsReadDefault) SetPayload added in v0.0.3

func (o *VisitsReadDefault) SetPayload(payload *models.Error)

SetPayload sets the payload to the visits read default response

func (*VisitsReadDefault) SetStatusCode added in v0.0.3

func (o *VisitsReadDefault) SetStatusCode(code int)

SetStatusCode sets the status to the visits read default response

func (*VisitsReadDefault) WithPayload added in v0.0.3

func (o *VisitsReadDefault) WithPayload(payload *models.Error) *VisitsReadDefault

WithPayload adds the payload to the visits read default response

func (*VisitsReadDefault) WithStatusCode added in v0.0.3

func (o *VisitsReadDefault) WithStatusCode(code int) *VisitsReadDefault

WithStatusCode adds the status to the visits read default response

func (*VisitsReadDefault) WriteResponse added in v0.0.3

func (o *VisitsReadDefault) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)

WriteResponse to the client

type VisitsReadHandler added in v0.0.3

type VisitsReadHandler interface {
	Handle(VisitsReadParams, *models.Principal) middleware.Responder
}

VisitsReadHandler interface for that can handle valid visits read params

type VisitsReadHandlerFunc added in v0.0.3

type VisitsReadHandlerFunc func(VisitsReadParams, *models.Principal) middleware.Responder

VisitsReadHandlerFunc turns a function with the right signature into a visits read handler

func (VisitsReadHandlerFunc) Handle added in v0.0.3

Handle executing the request and returning a response

type VisitsReadOK added in v0.0.3

type VisitsReadOK struct {

	/*
	  In: Body
	*/
	Payload map[string][]models.Visit `json:"body,omitempty"`
}

VisitsReadOK The Visits data was successfully retrieved.

swagger:response visitsReadOK

func NewVisitsReadOK added in v0.0.3

func NewVisitsReadOK() *VisitsReadOK

NewVisitsReadOK creates VisitsReadOK with default headers values

func (*VisitsReadOK) SetPayload added in v0.0.3

func (o *VisitsReadOK) SetPayload(payload map[string][]models.Visit)

SetPayload sets the payload to the visits read o k response

func (*VisitsReadOK) WithPayload added in v0.0.3

func (o *VisitsReadOK) WithPayload(payload map[string][]models.Visit) *VisitsReadOK

WithPayload adds the payload to the visits read o k response

func (*VisitsReadOK) WriteResponse added in v0.0.3

func (o *VisitsReadOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)

WriteResponse to the client

type VisitsReadParams added in v0.0.3

type VisitsReadParams struct {

	// HTTP Request Object
	HTTPRequest *http.Request `json:"-"`

	/*The shortened URLs to read the Visits data for.
	  Required: true
	  In: body
	*/
	ShortenedURLs []string
}

VisitsReadParams contains all the bound params for the visits read operation typically these are obtained from a http.Request

swagger:parameters visitsRead

func NewVisitsReadParams added in v0.0.3

func NewVisitsReadParams() VisitsReadParams

NewVisitsReadParams creates a new VisitsReadParams object

There are no default values defined in the spec.

func (*VisitsReadParams) BindRequest added in v0.0.3

func (o *VisitsReadParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error

BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface for simple values it will use straight method calls.

To ensure default values, the struct must have been initialized with NewVisitsReadParams() beforehand.

type VisitsReadURL added in v0.0.3

type VisitsReadURL struct {
	// contains filtered or unexported fields
}

VisitsReadURL generates an URL for the visits read operation

func (*VisitsReadURL) Build added in v0.0.3

func (o *VisitsReadURL) Build() (*url.URL, error)

Build a url path and query string

func (*VisitsReadURL) BuildFull added in v0.0.3

func (o *VisitsReadURL) BuildFull(scheme, host string) (*url.URL, error)

BuildFull builds a full url with scheme, host, path and query string

func (*VisitsReadURL) Must added in v0.0.3

func (o *VisitsReadURL) Must(u *url.URL, err error) *url.URL

Must is a helper function to panic when the url builder returns an error

func (*VisitsReadURL) SetBasePath added in v0.0.3

func (o *VisitsReadURL) SetBasePath(bp string)

SetBasePath sets the base path for this url builder, only required when it's different from the base path specified in the swagger spec. When the value of the base path is an empty string

func (*VisitsReadURL) String added in v0.0.3

func (o *VisitsReadURL) String() string

String returns the string representation of the path with query string

func (*VisitsReadURL) StringFull added in v0.0.3

func (o *VisitsReadURL) StringFull(scheme, host string) string

StringFull returns the string representation of a complete url

func (*VisitsReadURL) WithBasePath added in v0.0.3

func (o *VisitsReadURL) WithBasePath(bp string) *VisitsReadURL

WithBasePath sets the base path for this url builder, only required when it's different from the base path specified in the swagger spec. When the value of the base path is an empty string

Jump to

Keyboard shortcuts

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