Documentation
¶
Index ¶
- Constants
- type PublicRedirect
- type PublicRedirectFound
- type PublicRedirectHandler
- type PublicRedirectHandlerFunc
- type PublicRedirectMovedPermanently
- type PublicRedirectNotFound
- type PublicRedirectOK
- type PublicRedirectParams
- type PublicRedirectURL
- func (o *PublicRedirectURL) Build() (*url.URL, error)
- func (o *PublicRedirectURL) BuildFull(scheme, host string) (*url.URL, error)
- func (o *PublicRedirectURL) Must(u *url.URL, err error) *url.URL
- func (o *PublicRedirectURL) SetBasePath(bp string)
- func (o *PublicRedirectURL) String() string
- func (o *PublicRedirectURL) StringFull(scheme, host string) string
- func (o *PublicRedirectURL) WithBasePath(bp string) *PublicRedirectURL
Constants ¶
const PublicRedirectFoundCode int = 302
PublicRedirectFoundCode is the HTTP code returned for type PublicRedirectFound
const PublicRedirectMovedPermanentlyCode int = 301
PublicRedirectMovedPermanentlyCode is the HTTP code returned for type PublicRedirectMovedPermanently
const PublicRedirectNotFoundCode int = 404
PublicRedirectNotFoundCode is the HTTP code returned for type PublicRedirectNotFound
const PublicRedirectOKCode int = 200
PublicRedirectOKCode is the HTTP code returned for type PublicRedirectOK
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PublicRedirect ¶ added in v0.0.3
type PublicRedirect struct { Context *middleware.Context Handler PublicRedirectHandler }
PublicRedirect swagger:route GET /{shortenedURL} public publicRedirect
Typically a web browser would visit this endpoint, then get redirected.
Use the shortened URL. It will redirect to the full URL if it has not expired.
func NewPublicRedirect ¶ added in v0.0.3
func NewPublicRedirect(ctx *middleware.Context, handler PublicRedirectHandler) *PublicRedirect
NewPublicRedirect creates a new http.Handler for the public redirect operation
func (*PublicRedirect) ServeHTTP ¶ added in v0.0.3
func (o *PublicRedirect) ServeHTTP(rw http.ResponseWriter, r *http.Request)
type PublicRedirectFound ¶ added in v0.0.3
type PublicRedirectFound struct { /*The full URL that the redirect leads to. */ Location string `json:"Location"` }
PublicRedirectFound An HTTP response that will serve as a temporary redirect to the shortened URL's full URL.
swagger:response publicRedirectFound
func NewPublicRedirectFound ¶ added in v0.0.3
func NewPublicRedirectFound() *PublicRedirectFound
NewPublicRedirectFound creates PublicRedirectFound with default headers values
func (*PublicRedirectFound) SetLocation ¶ added in v0.0.3
func (o *PublicRedirectFound) SetLocation(location string)
SetLocation sets the location to the public redirect found response
func (*PublicRedirectFound) WithLocation ¶ added in v0.0.3
func (o *PublicRedirectFound) WithLocation(location string) *PublicRedirectFound
WithLocation adds the location to the public redirect found response
func (*PublicRedirectFound) WriteResponse ¶ added in v0.0.3
func (o *PublicRedirectFound) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)
WriteResponse to the client
type PublicRedirectHandler ¶ added in v0.0.3
type PublicRedirectHandler interface {
Handle(PublicRedirectParams) middleware.Responder
}
PublicRedirectHandler interface for that can handle valid public redirect params
type PublicRedirectHandlerFunc ¶ added in v0.0.3
type PublicRedirectHandlerFunc func(PublicRedirectParams) middleware.Responder
PublicRedirectHandlerFunc turns a function with the right signature into a public redirect handler
func (PublicRedirectHandlerFunc) Handle ¶ added in v0.0.3
func (fn PublicRedirectHandlerFunc) Handle(params PublicRedirectParams) middleware.Responder
Handle executing the request and returning a response
type PublicRedirectMovedPermanently ¶ added in v0.0.3
type PublicRedirectMovedPermanently struct { /*The full URL that the redirect leads to. */ Location string `json:"Location"` }
PublicRedirectMovedPermanently An HTTP response that will server as a permanent redirect to the shortened URL's full URL.
swagger:response publicRedirectMovedPermanently
func NewPublicRedirectMovedPermanently ¶ added in v0.0.3
func NewPublicRedirectMovedPermanently() *PublicRedirectMovedPermanently
NewPublicRedirectMovedPermanently creates PublicRedirectMovedPermanently with default headers values
func (*PublicRedirectMovedPermanently) SetLocation ¶ added in v0.0.3
func (o *PublicRedirectMovedPermanently) SetLocation(location string)
SetLocation sets the location to the public redirect moved permanently response
func (*PublicRedirectMovedPermanently) WithLocation ¶ added in v0.0.3
func (o *PublicRedirectMovedPermanently) WithLocation(location string) *PublicRedirectMovedPermanently
WithLocation adds the location to the public redirect moved permanently response
func (*PublicRedirectMovedPermanently) WriteResponse ¶ added in v0.0.3
func (o *PublicRedirectMovedPermanently) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)
WriteResponse to the client
type PublicRedirectNotFound ¶ added in v0.0.3
type PublicRedirectNotFound struct { }
PublicRedirectNotFound The shortened URL expired or never existed.
swagger:response publicRedirectNotFound
func NewPublicRedirectNotFound ¶ added in v0.0.3
func NewPublicRedirectNotFound() *PublicRedirectNotFound
NewPublicRedirectNotFound creates PublicRedirectNotFound with default headers values
func (*PublicRedirectNotFound) WriteResponse ¶ added in v0.0.3
func (o *PublicRedirectNotFound) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)
WriteResponse to the client
type PublicRedirectOK ¶ added in v0.0.3
type PublicRedirectOK struct { /* In: Body */ Payload io.ReadCloser `json:"body,omitempty"` }
PublicRedirectOK The HTML document containing a social media link preview and or JavaScript fingerprinting. Any visitor will be automatically redirected to the original link with JavaScript.
swagger:response publicRedirectOK
func NewPublicRedirectOK ¶ added in v0.0.3
func NewPublicRedirectOK() *PublicRedirectOK
NewPublicRedirectOK creates PublicRedirectOK with default headers values
func (*PublicRedirectOK) SetPayload ¶ added in v0.0.3
func (o *PublicRedirectOK) SetPayload(payload io.ReadCloser)
SetPayload sets the payload to the public redirect o k response
func (*PublicRedirectOK) WithPayload ¶ added in v0.0.3
func (o *PublicRedirectOK) WithPayload(payload io.ReadCloser) *PublicRedirectOK
WithPayload adds the payload to the public redirect o k response
func (*PublicRedirectOK) WriteResponse ¶ added in v0.0.3
func (o *PublicRedirectOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)
WriteResponse to the client
type PublicRedirectParams ¶ added in v0.0.3
type PublicRedirectParams struct { // HTTP Request Object HTTPRequest *http.Request `json:"-"` /* Required: true In: path */ ShortenedURL string }
PublicRedirectParams contains all the bound params for the public redirect operation typically these are obtained from a http.Request
swagger:parameters publicRedirect
func NewPublicRedirectParams ¶ added in v0.0.3
func NewPublicRedirectParams() PublicRedirectParams
NewPublicRedirectParams creates a new PublicRedirectParams object
There are no default values defined in the spec.
func (*PublicRedirectParams) BindRequest ¶ added in v0.0.3
func (o *PublicRedirectParams) 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 NewPublicRedirectParams() beforehand.
type PublicRedirectURL ¶ added in v0.0.3
type PublicRedirectURL struct { ShortenedURL string // contains filtered or unexported fields }
PublicRedirectURL generates an URL for the public redirect operation
func (*PublicRedirectURL) Build ¶ added in v0.0.3
func (o *PublicRedirectURL) Build() (*url.URL, error)
Build a url path and query string
func (*PublicRedirectURL) BuildFull ¶ added in v0.0.3
func (o *PublicRedirectURL) BuildFull(scheme, host string) (*url.URL, error)
BuildFull builds a full url with scheme, host, path and query string
func (*PublicRedirectURL) Must ¶ added in v0.0.3
Must is a helper function to panic when the url builder returns an error
func (*PublicRedirectURL) SetBasePath ¶ added in v0.0.3
func (o *PublicRedirectURL) 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 (*PublicRedirectURL) String ¶ added in v0.0.3
func (o *PublicRedirectURL) String() string
String returns the string representation of the path with query string
func (*PublicRedirectURL) StringFull ¶ added in v0.0.3
func (o *PublicRedirectURL) StringFull(scheme, host string) string
StringFull returns the string representation of a complete url
func (*PublicRedirectURL) WithBasePath ¶ added in v0.0.3
func (o *PublicRedirectURL) WithBasePath(bp string) *PublicRedirectURL
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