did

package
v0.0.0-...-3a21ec0 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const ValidateDidBadRequestCode int = 400

ValidateDidBadRequestCode is the HTTP code returned for type ValidateDidBadRequest

View Source
const ValidateDidInternalServerErrorCode int = 500

ValidateDidInternalServerErrorCode is the HTTP code returned for type ValidateDidInternalServerError

View Source
const ValidateDidNotFoundCode int = 404

ValidateDidNotFoundCode is the HTTP code returned for type ValidateDidNotFound

View Source
const ValidateDidOKCode int = 200

ValidateDidOKCode is the HTTP code returned for type ValidateDidOK

Variables

This section is empty.

Functions

This section is empty.

Types

type ValidateDid

type ValidateDid struct {
	Context *middleware.Context
	Handler ValidateDidHandler
}

ValidateDid swagger:route GET /did/{did} did validateDid

Validate a DID

This service validates through JWT if a DID is valid. The JWT contains a did of a person, institution or object that needs be validated. The owner of did sign the payload with its private key

func NewValidateDid

func NewValidateDid(ctx *middleware.Context, handler ValidateDidHandler) *ValidateDid

NewValidateDid creates a new http.Handler for the validate did operation

func (*ValidateDid) ServeHTTP

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

type ValidateDidBadRequest

type ValidateDidBadRequest struct {
}

ValidateDidBadRequest Invalid did supplied

swagger:response validateDidBadRequest

func NewValidateDidBadRequest

func NewValidateDidBadRequest() *ValidateDidBadRequest

NewValidateDidBadRequest creates ValidateDidBadRequest with default headers values

func (*ValidateDidBadRequest) WriteResponse

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

WriteResponse to the client

type ValidateDidHandler

type ValidateDidHandler interface {
	Handle(ValidateDidParams) middleware.Responder
}

ValidateDidHandler interface for that can handle valid validate did params

type ValidateDidHandlerFunc

type ValidateDidHandlerFunc func(ValidateDidParams) middleware.Responder

ValidateDidHandlerFunc turns a function with the right signature into a validate did handler

func (ValidateDidHandlerFunc) Handle

Handle executing the request and returning a response

type ValidateDidInternalServerError

type ValidateDidInternalServerError struct {
}

ValidateDidInternalServerError Error Internal Server

swagger:response validateDidInternalServerError

func NewValidateDidInternalServerError

func NewValidateDidInternalServerError() *ValidateDidInternalServerError

NewValidateDidInternalServerError creates ValidateDidInternalServerError with default headers values

func (*ValidateDidInternalServerError) WriteResponse

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

WriteResponse to the client

type ValidateDidNotFound

type ValidateDidNotFound struct {
}

ValidateDidNotFound DID not found

swagger:response validateDidNotFound

func NewValidateDidNotFound

func NewValidateDidNotFound() *ValidateDidNotFound

NewValidateDidNotFound creates ValidateDidNotFound with default headers values

func (*ValidateDidNotFound) WriteResponse

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

WriteResponse to the client

type ValidateDidOK

type ValidateDidOK struct {
}

ValidateDidOK successful operation

swagger:response validateDidOK

func NewValidateDidOK

func NewValidateDidOK() *ValidateDidOK

NewValidateDidOK creates ValidateDidOK with default headers values

func (*ValidateDidOK) WriteResponse

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

WriteResponse to the client

type ValidateDidParams

type ValidateDidParams struct {

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

	/*The did that needs be validated. Use JWT. Example: eyJhbGciOiJFUzI1NksiLCJ0eXAiOiJKV1QifQ.eyJzdWIiOiJkaWQ6ZXY6MnVpMVhQUmthOEV4d21GOG9KaFE2cVpicXMxWEdBUTJ5dUYiLCJpc3MiOiJmYWQ2Mjg0OGYxYTZjZGU0YzRkOTQ1M2RhZGVhNzE0Y2JkNTlmMTI4MjA4Nzg1M2RlOGIwYzYwNzJiZWMyN2U3YzZkOTExOWViMTY5YjQ0NDAzZTgzYjVlODdmOThjNzJiMDFjMmQ0NjQyMDA2YjE1NDZiMDA0MGFhNGUwNTU0ZiIsImlhdCI6MTU0OTMwNzMzMCwiZXhwIjoxNTQ5NDg3MzMwfQ.f2PJRQeb4BY-LiRZm_DnJw1aS2Anu5AAav6Wuq6ZbddgvMFg35tEbTm2vCVlRN-sjQ_Ffsce3ZfrBS2tqlSM9w
	  Required: true
	  In: path
	*/
	Did string
}

ValidateDidParams contains all the bound params for the validate did operation typically these are obtained from a http.Request

swagger:parameters validateDid

func NewValidateDidParams

func NewValidateDidParams() ValidateDidParams

NewValidateDidParams creates a new ValidateDidParams object no default values defined in spec.

func (*ValidateDidParams) BindRequest

func (o *ValidateDidParams) 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 NewValidateDidParams() beforehand.

type ValidateDidURL

type ValidateDidURL struct {
	Did string
	// contains filtered or unexported fields
}

ValidateDidURL generates an URL for the validate did operation

func (*ValidateDidURL) Build

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

Build a url path and query string

func (*ValidateDidURL) BuildFull

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

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

func (*ValidateDidURL) Must

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

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

func (*ValidateDidURL) SetBasePath

func (o *ValidateDidURL) 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 (*ValidateDidURL) String

func (o *ValidateDidURL) String() string

String returns the string representation of the path with query string

func (*ValidateDidURL) StringFull

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

StringFull returns the string representation of a complete url

func (*ValidateDidURL) WithBasePath

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

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