client

package
v6.2.14 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2026 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Overview

Package client provides primitives to interact with the openapi HTTP API.

Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.4.1 DO NOT EDIT.

Index

Constants

View Source
const (
	JwtBearerAuthScopes = "jwtBearerAuth.Scopes"
)
View Source
const JwtBearerGrantType = "urn:ietf:params:oauth:grant-type:jwt-bearer"

JwtBearerGrantType defines the grant-type to use in the access token request

Variables

This section is empty.

Functions

func NewCreateAccessTokenRequestWithBody

func NewCreateAccessTokenRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewCreateAccessTokenRequestWithBody generates requests for CreateAccessToken with any type of body

func NewCreateAccessTokenRequestWithFormdataBody

func NewCreateAccessTokenRequestWithFormdataBody(server string, body CreateAccessTokenFormdataRequestBody) (*http.Request, error)

NewCreateAccessTokenRequestWithFormdataBody calls the generic CreateAccessToken builder with application/x-www-form-urlencoded body

func NewCreateJwtGrantRequest

func NewCreateJwtGrantRequest(server string, body CreateJwtGrantJSONRequestBody) (*http.Request, error)

NewCreateJwtGrantRequest calls the generic CreateJwtGrant builder with application/json body

func NewCreateJwtGrantRequestWithBody

func NewCreateJwtGrantRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewCreateJwtGrantRequestWithBody generates requests for CreateJwtGrant with any type of body

func NewCreateSignSessionRequest

func NewCreateSignSessionRequest(server string, body CreateSignSessionJSONRequestBody) (*http.Request, error)

NewCreateSignSessionRequest calls the generic CreateSignSession builder with application/json body

func NewCreateSignSessionRequestWithBody

func NewCreateSignSessionRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewCreateSignSessionRequestWithBody generates requests for CreateSignSession with any type of body

func NewDrawUpContractRequest

func NewDrawUpContractRequest(server string, body DrawUpContractJSONRequestBody) (*http.Request, error)

NewDrawUpContractRequest calls the generic DrawUpContract builder with application/json body

func NewDrawUpContractRequestWithBody

func NewDrawUpContractRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewDrawUpContractRequestWithBody generates requests for DrawUpContract with any type of body

func NewGetContractByTypeRequest

func NewGetContractByTypeRequest(server string, contractType string, params *GetContractByTypeParams) (*http.Request, error)

NewGetContractByTypeRequest generates requests for GetContractByType

func NewGetSignSessionStatusRequest

func NewGetSignSessionStatusRequest(server string, sessionID string) (*http.Request, error)

NewGetSignSessionStatusRequest generates requests for GetSignSessionStatus

func NewIntrospectAccessTokenRequestWithBody

func NewIntrospectAccessTokenRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewIntrospectAccessTokenRequestWithBody generates requests for IntrospectAccessToken with any type of body

func NewIntrospectAccessTokenRequestWithFormdataBody

func NewIntrospectAccessTokenRequestWithFormdataBody(server string, body IntrospectAccessTokenFormdataRequestBody) (*http.Request, error)

NewIntrospectAccessTokenRequestWithFormdataBody calls the generic IntrospectAccessToken builder with application/x-www-form-urlencoded body

func NewRequestAccessTokenRequest

func NewRequestAccessTokenRequest(server string, body RequestAccessTokenJSONRequestBody) (*http.Request, error)

NewRequestAccessTokenRequest calls the generic RequestAccessToken builder with application/json body

func NewRequestAccessTokenRequestWithBody

func NewRequestAccessTokenRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewRequestAccessTokenRequestWithBody generates requests for RequestAccessToken with any type of body

func NewVerifyAccessTokenRequest

func NewVerifyAccessTokenRequest(server string, params *VerifyAccessTokenParams) (*http.Request, error)

NewVerifyAccessTokenRequest generates requests for VerifyAccessToken

func NewVerifySignatureRequest

func NewVerifySignatureRequest(server string, body VerifySignatureJSONRequestBody) (*http.Request, error)

NewVerifySignatureRequest calls the generic VerifySignature builder with application/json body

func NewVerifySignatureRequestWithBody

func NewVerifySignatureRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewVerifySignatureRequestWithBody generates requests for VerifySignature with any type of body

Types

type AccessTokenRequestFailedResponse

type AccessTokenRequestFailedResponse = oauth.OAuth2Error

AccessTokenRequestFailedResponse is an alias to use from within the API

type AccessTokenResponse

type AccessTokenResponse = oauth.TokenResponse

AccessTokenResponse is an alias to use from within the API

type Client

type Client struct {
	// The endpoint of the server conforming to this interface, with scheme,
	// https://api.deepmap.com for example. This can contain a path relative
	// to the server, such as https://api.deepmap.com/dev-test, and all the
	// paths in the swagger spec will be appended to the server.
	Server string

	// Doer for performing requests, typically a *http.Client with any
	// customized settings, such as certificate chains.
	Client HttpRequestDoer

	// A list of callbacks for modifying requests which are generated before sending over
	// the network.
	RequestEditors []RequestEditorFn
}

Client which conforms to the OpenAPI3 specification for this service.

func NewClient

func NewClient(server string, opts ...ClientOption) (*Client, error)

Creates a new Client, with reasonable defaults

func (*Client) CreateAccessTokenWithBody

func (c *Client) CreateAccessTokenWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) CreateAccessTokenWithFormdataBody

func (c *Client) CreateAccessTokenWithFormdataBody(ctx context.Context, body CreateAccessTokenFormdataRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) CreateJwtGrant

func (c *Client) CreateJwtGrant(ctx context.Context, body CreateJwtGrantJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) CreateJwtGrantWithBody

func (c *Client) CreateJwtGrantWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) CreateSignSession

func (c *Client) CreateSignSession(ctx context.Context, body CreateSignSessionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) CreateSignSessionWithBody

func (c *Client) CreateSignSessionWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) DrawUpContract

func (c *Client) DrawUpContract(ctx context.Context, body DrawUpContractJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) DrawUpContractWithBody

func (c *Client) DrawUpContractWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetContractByType

func (c *Client) GetContractByType(ctx context.Context, contractType string, params *GetContractByTypeParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetSignSessionStatus

func (c *Client) GetSignSessionStatus(ctx context.Context, sessionID string, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) IntrospectAccessTokenWithBody

func (c *Client) IntrospectAccessTokenWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) IntrospectAccessTokenWithFormdataBody

func (c *Client) IntrospectAccessTokenWithFormdataBody(ctx context.Context, body IntrospectAccessTokenFormdataRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) RequestAccessToken

func (c *Client) RequestAccessToken(ctx context.Context, body RequestAccessTokenJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) RequestAccessTokenWithBody

func (c *Client) RequestAccessTokenWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) VerifyAccessToken

func (c *Client) VerifyAccessToken(ctx context.Context, params *VerifyAccessTokenParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) VerifySignature

func (c *Client) VerifySignature(ctx context.Context, body VerifySignatureJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) VerifySignatureWithBody

func (c *Client) VerifySignatureWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

type ClientInterface

type ClientInterface interface {
	// IntrospectAccessTokenWithBody request with any body
	IntrospectAccessTokenWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	IntrospectAccessTokenWithFormdataBody(ctx context.Context, body IntrospectAccessTokenFormdataRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// VerifyAccessToken request
	VerifyAccessToken(ctx context.Context, params *VerifyAccessTokenParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// DrawUpContractWithBody request with any body
	DrawUpContractWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	DrawUpContract(ctx context.Context, body DrawUpContractJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// CreateJwtGrantWithBody request with any body
	CreateJwtGrantWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	CreateJwtGrant(ctx context.Context, body CreateJwtGrantJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// RequestAccessTokenWithBody request with any body
	RequestAccessTokenWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	RequestAccessToken(ctx context.Context, body RequestAccessTokenJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// CreateSignSessionWithBody request with any body
	CreateSignSessionWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	CreateSignSession(ctx context.Context, body CreateSignSessionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetSignSessionStatus request
	GetSignSessionStatus(ctx context.Context, sessionID string, reqEditors ...RequestEditorFn) (*http.Response, error)

	// VerifySignatureWithBody request with any body
	VerifySignatureWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	VerifySignature(ctx context.Context, body VerifySignatureJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// CreateAccessTokenWithBody request with any body
	CreateAccessTokenWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	CreateAccessTokenWithFormdataBody(ctx context.Context, body CreateAccessTokenFormdataRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetContractByType request
	GetContractByType(ctx context.Context, contractType string, params *GetContractByTypeParams, reqEditors ...RequestEditorFn) (*http.Response, error)
}

The interface specification for the client above.

type ClientOption

type ClientOption func(*Client) error

ClientOption allows setting custom parameters during construction

func WithBaseURL

func WithBaseURL(baseURL string) ClientOption

WithBaseURL overrides the baseURL.

func WithHTTPClient

func WithHTTPClient(doer HttpRequestDoer) ClientOption

WithHTTPClient allows overriding the default Doer, which is automatically created using http.Client. This is useful for tests.

func WithRequestEditorFn

func WithRequestEditorFn(fn RequestEditorFn) ClientOption

WithRequestEditorFn allows setting up a callback function, which will be called right before sending the request. This can be used to mutate the request.

type ClientWithResponses

type ClientWithResponses struct {
	ClientInterface
}

ClientWithResponses builds on ClientInterface to offer response payloads

func NewClientWithResponses

func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error)

NewClientWithResponses creates a new ClientWithResponses, which wraps Client with return type handling

func (*ClientWithResponses) CreateAccessTokenWithBodyWithResponse

func (c *ClientWithResponses) CreateAccessTokenWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateAccessTokenResponse, error)

CreateAccessTokenWithBodyWithResponse request with arbitrary body returning *CreateAccessTokenResponse

func (*ClientWithResponses) CreateAccessTokenWithFormdataBodyWithResponse

func (c *ClientWithResponses) CreateAccessTokenWithFormdataBodyWithResponse(ctx context.Context, body CreateAccessTokenFormdataRequestBody, reqEditors ...RequestEditorFn) (*CreateAccessTokenResponse, error)

func (*ClientWithResponses) CreateJwtGrantWithBodyWithResponse

func (c *ClientWithResponses) CreateJwtGrantWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateJwtGrantResponse, error)

CreateJwtGrantWithBodyWithResponse request with arbitrary body returning *CreateJwtGrantResponse

func (*ClientWithResponses) CreateJwtGrantWithResponse

func (c *ClientWithResponses) CreateJwtGrantWithResponse(ctx context.Context, body CreateJwtGrantJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateJwtGrantResponse, error)

func (*ClientWithResponses) CreateSignSessionWithBodyWithResponse

func (c *ClientWithResponses) CreateSignSessionWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateSignSessionResponse, error)

CreateSignSessionWithBodyWithResponse request with arbitrary body returning *CreateSignSessionResponse

func (*ClientWithResponses) CreateSignSessionWithResponse

func (c *ClientWithResponses) CreateSignSessionWithResponse(ctx context.Context, body CreateSignSessionJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateSignSessionResponse, error)

func (*ClientWithResponses) DrawUpContractWithBodyWithResponse

func (c *ClientWithResponses) DrawUpContractWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DrawUpContractResponse, error)

DrawUpContractWithBodyWithResponse request with arbitrary body returning *DrawUpContractResponse

func (*ClientWithResponses) DrawUpContractWithResponse

func (c *ClientWithResponses) DrawUpContractWithResponse(ctx context.Context, body DrawUpContractJSONRequestBody, reqEditors ...RequestEditorFn) (*DrawUpContractResponse, error)

func (*ClientWithResponses) GetContractByTypeWithResponse

func (c *ClientWithResponses) GetContractByTypeWithResponse(ctx context.Context, contractType string, params *GetContractByTypeParams, reqEditors ...RequestEditorFn) (*GetContractByTypeResponse, error)

GetContractByTypeWithResponse request returning *GetContractByTypeResponse

func (*ClientWithResponses) GetSignSessionStatusWithResponse

func (c *ClientWithResponses) GetSignSessionStatusWithResponse(ctx context.Context, sessionID string, reqEditors ...RequestEditorFn) (*GetSignSessionStatusResponse, error)

GetSignSessionStatusWithResponse request returning *GetSignSessionStatusResponse

func (*ClientWithResponses) IntrospectAccessTokenWithBodyWithResponse

func (c *ClientWithResponses) IntrospectAccessTokenWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*IntrospectAccessTokenResponse, error)

IntrospectAccessTokenWithBodyWithResponse request with arbitrary body returning *IntrospectAccessTokenResponse

func (*ClientWithResponses) IntrospectAccessTokenWithFormdataBodyWithResponse

func (c *ClientWithResponses) IntrospectAccessTokenWithFormdataBodyWithResponse(ctx context.Context, body IntrospectAccessTokenFormdataRequestBody, reqEditors ...RequestEditorFn) (*IntrospectAccessTokenResponse, error)

func (*ClientWithResponses) RequestAccessTokenWithBodyWithResponse

func (c *ClientWithResponses) RequestAccessTokenWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RequestAccessTokenResponse, error)

RequestAccessTokenWithBodyWithResponse request with arbitrary body returning *RequestAccessTokenResponse

func (*ClientWithResponses) RequestAccessTokenWithResponse

func (c *ClientWithResponses) RequestAccessTokenWithResponse(ctx context.Context, body RequestAccessTokenJSONRequestBody, reqEditors ...RequestEditorFn) (*RequestAccessTokenResponse, error)

func (*ClientWithResponses) VerifyAccessTokenWithResponse

func (c *ClientWithResponses) VerifyAccessTokenWithResponse(ctx context.Context, params *VerifyAccessTokenParams, reqEditors ...RequestEditorFn) (*VerifyAccessTokenResponse, error)

VerifyAccessTokenWithResponse request returning *VerifyAccessTokenResponse

func (*ClientWithResponses) VerifySignatureWithBodyWithResponse

func (c *ClientWithResponses) VerifySignatureWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*VerifySignatureResponse, error)

VerifySignatureWithBodyWithResponse request with arbitrary body returning *VerifySignatureResponse

func (*ClientWithResponses) VerifySignatureWithResponse

func (c *ClientWithResponses) VerifySignatureWithResponse(ctx context.Context, body VerifySignatureJSONRequestBody, reqEditors ...RequestEditorFn) (*VerifySignatureResponse, error)

type ClientWithResponsesInterface

type ClientWithResponsesInterface interface {
	// IntrospectAccessTokenWithBodyWithResponse request with any body
	IntrospectAccessTokenWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*IntrospectAccessTokenResponse, error)

	IntrospectAccessTokenWithFormdataBodyWithResponse(ctx context.Context, body IntrospectAccessTokenFormdataRequestBody, reqEditors ...RequestEditorFn) (*IntrospectAccessTokenResponse, error)

	// VerifyAccessTokenWithResponse request
	VerifyAccessTokenWithResponse(ctx context.Context, params *VerifyAccessTokenParams, reqEditors ...RequestEditorFn) (*VerifyAccessTokenResponse, error)

	// DrawUpContractWithBodyWithResponse request with any body
	DrawUpContractWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DrawUpContractResponse, error)

	DrawUpContractWithResponse(ctx context.Context, body DrawUpContractJSONRequestBody, reqEditors ...RequestEditorFn) (*DrawUpContractResponse, error)

	// CreateJwtGrantWithBodyWithResponse request with any body
	CreateJwtGrantWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateJwtGrantResponse, error)

	CreateJwtGrantWithResponse(ctx context.Context, body CreateJwtGrantJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateJwtGrantResponse, error)

	// RequestAccessTokenWithBodyWithResponse request with any body
	RequestAccessTokenWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RequestAccessTokenResponse, error)

	RequestAccessTokenWithResponse(ctx context.Context, body RequestAccessTokenJSONRequestBody, reqEditors ...RequestEditorFn) (*RequestAccessTokenResponse, error)

	// CreateSignSessionWithBodyWithResponse request with any body
	CreateSignSessionWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateSignSessionResponse, error)

	CreateSignSessionWithResponse(ctx context.Context, body CreateSignSessionJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateSignSessionResponse, error)

	// GetSignSessionStatusWithResponse request
	GetSignSessionStatusWithResponse(ctx context.Context, sessionID string, reqEditors ...RequestEditorFn) (*GetSignSessionStatusResponse, error)

	// VerifySignatureWithBodyWithResponse request with any body
	VerifySignatureWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*VerifySignatureResponse, error)

	VerifySignatureWithResponse(ctx context.Context, body VerifySignatureJSONRequestBody, reqEditors ...RequestEditorFn) (*VerifySignatureResponse, error)

	// CreateAccessTokenWithBodyWithResponse request with any body
	CreateAccessTokenWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateAccessTokenResponse, error)

	CreateAccessTokenWithFormdataBodyWithResponse(ctx context.Context, body CreateAccessTokenFormdataRequestBody, reqEditors ...RequestEditorFn) (*CreateAccessTokenResponse, error)

	// GetContractByTypeWithResponse request
	GetContractByTypeWithResponse(ctx context.Context, contractType string, params *GetContractByTypeParams, reqEditors ...RequestEditorFn) (*GetContractByTypeResponse, error)
}

ClientWithResponsesInterface is the interface specification for the client with responses above.

type Contract

type Contract struct {
	// Language Language of the contract in all caps.
	Language           ContractLanguage `json:"language"`
	SignerAttributes   *[]string        `json:"signer_attributes,omitempty"`
	Template           *string          `json:"template,omitempty"`
	TemplateAttributes *[]string        `json:"template_attributes,omitempty"`

	// Type Type of which contract to sign.
	Type ContractType `json:"type"`

	// Version Version of the contract.
	Version ContractVersion `json:"version"`
}

Contract defines model for Contract.

type ContractLanguage

type ContractLanguage = string

ContractLanguage Language of the contract in all caps.

type ContractResponse

type ContractResponse struct {
	// Language Language of the contract in all caps.
	Language ContractLanguage `json:"language"`

	// Message The contract message.
	Message string `json:"message"`

	// Type Type of which contract to sign.
	Type ContractType `json:"type"`

	// Version Version of the contract.
	Version ContractVersion `json:"version"`
}

ContractResponse defines model for ContractResponse.

type ContractType

type ContractType = string

ContractType Type of which contract to sign.

type ContractVersion

type ContractVersion = string

ContractVersion Version of the contract.

type CreateAccessTokenFormdataRequestBody

type CreateAccessTokenFormdataRequestBody = CreateAccessTokenRequest

CreateAccessTokenFormdataRequestBody defines body for CreateAccessToken for application/x-www-form-urlencoded ContentType.

type CreateAccessTokenRequest

type CreateAccessTokenRequest struct {
	// Assertion Base64 encoded JWT following rfc7523 and the Nuts documentation
	Assertion string `json:"assertion"`

	// GrantType always must contain the value "urn:ietf:params:oauth:grant-type:jwt-bearer"
	GrantType string `json:"grant_type"`
}

CreateAccessTokenRequest Request as described in RFC7523 section 2.1

type CreateAccessTokenResponse

type CreateAccessTokenResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *AccessTokenResponse
	JSON400      *AccessTokenRequestFailedResponse
}

func ParseCreateAccessTokenResponse

func ParseCreateAccessTokenResponse(rsp *http.Response) (*CreateAccessTokenResponse, error)

ParseCreateAccessTokenResponse parses an HTTP response from a CreateAccessTokenWithResponse call

func (CreateAccessTokenResponse) Status

func (r CreateAccessTokenResponse) Status() string

Status returns HTTPResponse.Status

func (CreateAccessTokenResponse) StatusCode

func (r CreateAccessTokenResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type CreateJwtGrantJSONRequestBody

type CreateJwtGrantJSONRequestBody = CreateJwtGrantRequest

CreateJwtGrantJSONRequestBody defines body for CreateJwtGrant for application/json ContentType.

type CreateJwtGrantRequest

type CreateJwtGrantRequest struct {
	Authorizer  string                  `json:"authorizer"`
	Credentials []VerifiableCredential  `json:"credentials"`
	Identity    *VerifiablePresentation `json:"identity,omitempty"`
	Requester   string                  `json:"requester"`

	// Service The service for which this access token can be used. The right oauth endpoint is selected based on the service.
	Service string `json:"service"`
}

CreateJwtGrantRequest Request for a JWT Grant. The grant can be used during a Access Token Request in the assertion field

type CreateJwtGrantResponse

type CreateJwtGrantResponse struct {
	Body                          []byte
	HTTPResponse                  *http.Response
	JSON200                       *JwtGrantResponse
	ApplicationproblemJSONDefault *struct {
		// Detail A human-readable explanation specific to this occurrence of the problem.
		Detail string `json:"detail"`

		// Status HTTP statuscode
		Status float32 `json:"status"`

		// Title A short, human-readable summary of the problem type.
		Title string `json:"title"`
	}
}

func ParseCreateJwtGrantResponse

func ParseCreateJwtGrantResponse(rsp *http.Response) (*CreateJwtGrantResponse, error)

ParseCreateJwtGrantResponse parses an HTTP response from a CreateJwtGrantWithResponse call

func (CreateJwtGrantResponse) Status

func (r CreateJwtGrantResponse) Status() string

Status returns HTTPResponse.Status

func (CreateJwtGrantResponse) StatusCode

func (r CreateJwtGrantResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type CreateSignSessionJSONRequestBody

type CreateSignSessionJSONRequestBody = SignSessionRequest

CreateSignSessionJSONRequestBody defines body for CreateSignSession for application/json ContentType.

type CreateSignSessionResponse

type CreateSignSessionResponse struct {
	Body                          []byte
	HTTPResponse                  *http.Response
	JSON201                       *SignSessionResponse
	ApplicationproblemJSONDefault *struct {
		// Detail A human-readable explanation specific to this occurrence of the problem.
		Detail string `json:"detail"`

		// Status HTTP statuscode
		Status float32 `json:"status"`

		// Title A short, human-readable summary of the problem type.
		Title string `json:"title"`
	}
}

func ParseCreateSignSessionResponse

func ParseCreateSignSessionResponse(rsp *http.Response) (*CreateSignSessionResponse, error)

ParseCreateSignSessionResponse parses an HTTP response from a CreateSignSessionWithResponse call

func (CreateSignSessionResponse) Status

func (r CreateSignSessionResponse) Status() string

Status returns HTTPResponse.Status

func (CreateSignSessionResponse) StatusCode

func (r CreateSignSessionResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type DrawUpContractJSONRequestBody

type DrawUpContractJSONRequestBody = DrawUpContractRequest

DrawUpContractJSONRequestBody defines body for DrawUpContract for application/json ContentType.

type DrawUpContractRequest

type DrawUpContractRequest struct {
	// Language Language of the contract in all caps.
	Language ContractLanguage `json:"language"`

	// LegalEntity DID of the organization as registered in the Nuts registry.
	LegalEntity            LegalEntity           `json:"legalEntity"`
	OrganizationCredential *VerifiableCredential `json:"organizationCredential,omitempty"`

	// Type Type of which contract to sign.
	Type ContractType `json:"type"`

	// ValidDuration The duration this contract is valid, starting from validFrom or current time if validFrom is omitted. Uses this node default when omitted. Valid time units are: 's', 'm', 'h'
	ValidDuration *string `json:"validDuration,omitempty"`

	// ValidFrom validFrom describes the time from which this contract should be considered valid. Current time is used when omitted.
	ValidFrom *string `json:"validFrom,omitempty"`

	// Version Version of the contract.
	Version ContractVersion `json:"version"`
}

DrawUpContractRequest defines model for DrawUpContractRequest.

type DrawUpContractResponse

type DrawUpContractResponse struct {
	Body                          []byte
	HTTPResponse                  *http.Response
	JSON200                       *ContractResponse
	ApplicationproblemJSONDefault *struct {
		// Detail A human-readable explanation specific to this occurrence of the problem.
		Detail string `json:"detail"`

		// Status HTTP statuscode
		Status float32 `json:"status"`

		// Title A short, human-readable summary of the problem type.
		Title string `json:"title"`
	}
}

func ParseDrawUpContractResponse

func ParseDrawUpContractResponse(rsp *http.Response) (*DrawUpContractResponse, error)

ParseDrawUpContractResponse parses an HTTP response from a DrawUpContractWithResponse call

func (DrawUpContractResponse) Status

func (r DrawUpContractResponse) Status() string

Status returns HTTPResponse.Status

func (DrawUpContractResponse) StatusCode

func (r DrawUpContractResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetContractByTypeParams

type GetContractByTypeParams struct {
	// Version The version of this contract. If omitted, the most recent version will be returned
	Version  *string `form:"version,omitempty" json:"version,omitempty"`
	Language *string `form:"language,omitempty" json:"language,omitempty"`
}

GetContractByTypeParams defines parameters for GetContractByType.

type GetContractByTypeResponse

type GetContractByTypeResponse struct {
	Body                          []byte
	HTTPResponse                  *http.Response
	JSON200                       *Contract
	ApplicationproblemJSONDefault *struct {
		// Detail A human-readable explanation specific to this occurrence of the problem.
		Detail string `json:"detail"`

		// Status HTTP statuscode
		Status float32 `json:"status"`

		// Title A short, human-readable summary of the problem type.
		Title string `json:"title"`
	}
}

func ParseGetContractByTypeResponse

func ParseGetContractByTypeResponse(rsp *http.Response) (*GetContractByTypeResponse, error)

ParseGetContractByTypeResponse parses an HTTP response from a GetContractByTypeWithResponse call

func (GetContractByTypeResponse) Status

func (r GetContractByTypeResponse) Status() string

Status returns HTTPResponse.Status

func (GetContractByTypeResponse) StatusCode

func (r GetContractByTypeResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetSignSessionStatusResponse

type GetSignSessionStatusResponse struct {
	Body                          []byte
	HTTPResponse                  *http.Response
	JSON200                       *SignSessionStatusResponse
	ApplicationproblemJSONDefault *struct {
		// Detail A human-readable explanation specific to this occurrence of the problem.
		Detail string `json:"detail"`

		// Status HTTP statuscode
		Status float32 `json:"status"`

		// Title A short, human-readable summary of the problem type.
		Title string `json:"title"`
	}
}

func ParseGetSignSessionStatusResponse

func ParseGetSignSessionStatusResponse(rsp *http.Response) (*GetSignSessionStatusResponse, error)

ParseGetSignSessionStatusResponse parses an HTTP response from a GetSignSessionStatusWithResponse call

func (GetSignSessionStatusResponse) Status

Status returns HTTPResponse.Status

func (GetSignSessionStatusResponse) StatusCode

func (r GetSignSessionStatusResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type HTTPClient

type HTTPClient struct {
	Timeout time.Duration
	// contains filtered or unexported fields
}

HTTPClient holds the server address and other basic settings for the http client

func NewHTTPClient

func NewHTTPClient(serverAddress string, timeout time.Duration, opts ...ClientOption) (*HTTPClient, error)

NewHTTPClient creates a new HTTPClient using the generated OAS client

func (HTTPClient) CreateAccessToken

func (h HTTPClient) CreateAccessToken(ctx context.Context, endpointURL url.URL, bearerToken string) (*AccessTokenResponse, error)

CreateAccessToken creates an access token and overrides the url by the 'endpointURL' input argument

type HttpRequestDoer

type HttpRequestDoer interface {
	Do(req *http.Request) (*http.Response, error)
}

Doer performs HTTP requests.

The standard http.Client implements this interface.

type IntrospectAccessTokenFormdataBody

type IntrospectAccessTokenFormdataBody struct {
	// Token JWT access token
	Token string `form:"token" json:"token"`
}

IntrospectAccessTokenFormdataBody defines parameters for IntrospectAccessToken.

type IntrospectAccessTokenFormdataRequestBody

type IntrospectAccessTokenFormdataRequestBody IntrospectAccessTokenFormdataBody

IntrospectAccessTokenFormdataRequestBody defines body for IntrospectAccessToken for application/x-www-form-urlencoded ContentType.

type IntrospectAccessTokenResponse

type IntrospectAccessTokenResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *TokenIntrospectionResponse
}

func ParseIntrospectAccessTokenResponse

func ParseIntrospectAccessTokenResponse(rsp *http.Response) (*IntrospectAccessTokenResponse, error)

ParseIntrospectAccessTokenResponse parses an HTTP response from a IntrospectAccessTokenWithResponse call

func (IntrospectAccessTokenResponse) Status

Status returns HTTPResponse.Status

func (IntrospectAccessTokenResponse) StatusCode

func (r IntrospectAccessTokenResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type JwtGrantResponse

type JwtGrantResponse struct {
	// AuthorizationServerEndpoint The URL that corresponds to the oauth endpoint of the selected service.
	AuthorizationServerEndpoint string `json:"authorization_server_endpoint"`
	BearerToken                 string `json:"bearer_token"`
}

JwtGrantResponse Response with a JWT Grant. It contains a JWT, signed with the private key of the requestor software vendor.

type LegalEntity

type LegalEntity = string

LegalEntity DID of the organization as registered in the Nuts registry.

type RequestAccessTokenJSONRequestBody

type RequestAccessTokenJSONRequestBody = RequestAccessTokenRequest

RequestAccessTokenJSONRequestBody defines body for RequestAccessToken for application/json ContentType.

type RequestAccessTokenRequest

type RequestAccessTokenRequest struct {
	Authorizer string `json:"authorizer"`

	// Credentials Verifiable Credentials to be included in the access token. If no VCs are to be included in the access token, the array can be left empty.
	Credentials []VerifiableCredential  `json:"credentials"`
	Identity    *VerifiablePresentation `json:"identity,omitempty"`
	Requester   string                  `json:"requester"`

	// Service The service for which this access token can be used. The right oauth endpoint is selected based on the service.
	Service string `json:"service"`
}

RequestAccessTokenRequest Request for a JWT Grant and use it as authorization grant to get the access token from the authorizer

type RequestAccessTokenResponse

type RequestAccessTokenResponse struct {
	Body                          []byte
	HTTPResponse                  *http.Response
	JSON200                       *AccessTokenResponse
	ApplicationproblemJSONDefault *struct {
		// Detail A human-readable explanation specific to this occurrence of the problem.
		Detail string `json:"detail"`

		// Status HTTP statuscode
		Status float32 `json:"status"`

		// Title A short, human-readable summary of the problem type.
		Title string `json:"title"`
	}
}

func ParseRequestAccessTokenResponse

func ParseRequestAccessTokenResponse(rsp *http.Response) (*RequestAccessTokenResponse, error)

ParseRequestAccessTokenResponse parses an HTTP response from a RequestAccessTokenWithResponse call

func (RequestAccessTokenResponse) Status

Status returns HTTPResponse.Status

func (RequestAccessTokenResponse) StatusCode

func (r RequestAccessTokenResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type RequestEditorFn

type RequestEditorFn func(ctx context.Context, req *http.Request) error

RequestEditorFn is the function signature for the RequestEditor callback function

type SignSessionRequest

type SignSessionRequest struct {
	Means SignSessionRequestMeans `json:"means"`

	// Params Params are passed to the means. Should be documented in the means documentation.
	Params map[string]interface{} `json:"params"`

	// Payload Base64 encoded payload what needs to be signed.
	Payload string `json:"payload"`
}

SignSessionRequest defines model for SignSessionRequest.

type SignSessionRequestMeans

type SignSessionRequestMeans string

SignSessionRequestMeans defines model for SignSessionRequest.Means.

const (
	SignSessionRequestMeansDummy      SignSessionRequestMeans = "dummy"
	SignSessionRequestMeansEmployeeid SignSessionRequestMeans = "employeeid"
	SignSessionRequestMeansIrma       SignSessionRequestMeans = "irma"
)

Defines values for SignSessionRequestMeans.

type SignSessionResponse

type SignSessionResponse struct {
	// Means The means this session uses to sign.
	Means SignSessionResponseMeans `json:"means"`

	// SessionID Unique identifier of this sign session.
	SessionID string `json:"sessionID"`

	// SessionPtr A pointer to a sign session. This is an opaque value which only has meaning in the context of the signing means. Can be an URL, base64 encoded image of a QRCode etc.
	SessionPtr map[string]interface{} `json:"sessionPtr"`
}

SignSessionResponse defines model for SignSessionResponse.

type SignSessionResponseMeans

type SignSessionResponseMeans string

SignSessionResponseMeans The means this session uses to sign.

const (
	SignSessionResponseMeansDummy      SignSessionResponseMeans = "dummy"
	SignSessionResponseMeansEmployeeid SignSessionResponseMeans = "employeeid"
	SignSessionResponseMeansIrma       SignSessionResponseMeans = "irma"
)

Defines values for SignSessionResponseMeans.

type SignSessionStatusResponse

type SignSessionStatusResponse struct {
	// Status Status indicates the status of the signing process. Values depend on the implementation of the signing means.
	Status                 string                  `json:"status"`
	VerifiablePresentation *VerifiablePresentation `json:"verifiablePresentation,omitempty"`
}

SignSessionStatusResponse defines model for SignSessionStatusResponse.

type SignatureVerificationRequest

type SignatureVerificationRequest struct {
	VerifiablePresentation VerifiablePresentation `json:"VerifiablePresentation"`

	// CheckTime Moment in time to check the validity of the signature. If omitted, the current time is used.
	CheckTime *string `json:"checkTime,omitempty"`
}

SignatureVerificationRequest defines model for SignatureVerificationRequest.

type SignatureVerificationResponse

type SignatureVerificationResponse struct {
	// Credentials Key value pairs containing claims and their values.
	Credentials *map[string]interface{} `json:"credentials,omitempty"`

	// IssuerAttributes Key vale pairs containing the attributes of the issuer.
	IssuerAttributes *map[string]interface{} `json:"issuerAttributes,omitempty"`

	// Validity Indicates the validity of the signature.
	Validity bool `json:"validity"`

	// VpType Type of Verifiable credential.
	VpType *string `json:"vpType,omitempty"`
}

SignatureVerificationResponse Contains the signature verification result.

type TokenIntrospectionResponse

type TokenIntrospectionResponse struct {
	// Active True if the token is active, false if the token is expired, malformed etc.
	Active bool `json:"active"`

	// AssuranceLevel Assurance level of the identity of the End-User.
	AssuranceLevel *TokenIntrospectionResponseAssuranceLevel `json:"assurance_level,omitempty"`

	// Aud As per rfc7523 https://tools.ietf.org/html/rfc7523>, the aud must be the
	// token endpoint. This can be taken from the Nuts registry.
	Aud *string `json:"aud,omitempty"`

	// Email End-User's preferred e-mail address. Should be a personal email and can be used to uniquely identify a user. Just like the email used for an account.
	Email *string `json:"email,omitempty"`
	Exp   *int    `json:"exp,omitempty"`

	// FamilyName Surname(s) or last name(s) of the End-User.
	FamilyName *string `json:"family_name,omitempty"`
	Iat        *int    `json:"iat,omitempty"`

	// Initials Initials of the End-User.
	Initials *string `json:"initials,omitempty"`

	// Iss The subject (not a Nuts subject) contains the DID of the authorizer.
	Iss *string `json:"iss,omitempty"`

	// Osi encoded ops signature. (TBD)
	Osi *string `json:"osi,omitempty"`

	// Prefix Surname prefix
	Prefix *string `json:"prefix,omitempty"`

	// ResolvedVCs credentials resolved from `vcs` (VC IDs). It contains only those VCs that could be resolved.
	ResolvedVCs *[]VerifiableCredential `json:"resolvedVCs,omitempty"`
	Service     *string                 `json:"service,omitempty"`

	// Sub The subject is always the acting party, thus the care organization requesting access to data.
	Sub *string `json:"sub,omitempty"`

	// UserRole Role of the End-User.
	UserRole *string `json:"user_role,omitempty"`

	// Username Identifier uniquely identifying the End-User's account in the issuing system.
	Username *string   `json:"username,omitempty"`
	Vcs      *[]string `json:"vcs,omitempty"`
}

TokenIntrospectionResponse Token introspection response as described in RFC7662 section 2.2

type TokenIntrospectionResponseAssuranceLevel

type TokenIntrospectionResponseAssuranceLevel string

TokenIntrospectionResponseAssuranceLevel Assurance level of the identity of the End-User.

Defines values for TokenIntrospectionResponseAssuranceLevel.

type VerifiableCredential

type VerifiableCredential = vc.VerifiableCredential

VerifiableCredential is an alias to use from within the API

type VerifiablePresentation

type VerifiablePresentation = vc.VerifiablePresentation

VerifiablePresentation is an alias to use from within the API

type VerifyAccessTokenParams

type VerifyAccessTokenParams struct {
	Authorization string `json:"Authorization"`
}

VerifyAccessTokenParams defines parameters for VerifyAccessToken.

type VerifyAccessTokenResponse

type VerifyAccessTokenResponse struct {
	Body         []byte
	HTTPResponse *http.Response
}

func ParseVerifyAccessTokenResponse

func ParseVerifyAccessTokenResponse(rsp *http.Response) (*VerifyAccessTokenResponse, error)

ParseVerifyAccessTokenResponse parses an HTTP response from a VerifyAccessTokenWithResponse call

func (VerifyAccessTokenResponse) Status

func (r VerifyAccessTokenResponse) Status() string

Status returns HTTPResponse.Status

func (VerifyAccessTokenResponse) StatusCode

func (r VerifyAccessTokenResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type VerifySignatureJSONRequestBody

type VerifySignatureJSONRequestBody = SignatureVerificationRequest

VerifySignatureJSONRequestBody defines body for VerifySignature for application/json ContentType.

type VerifySignatureResponse

type VerifySignatureResponse struct {
	Body                          []byte
	HTTPResponse                  *http.Response
	JSON200                       *SignatureVerificationResponse
	ApplicationproblemJSONDefault *struct {
		// Detail A human-readable explanation specific to this occurrence of the problem.
		Detail string `json:"detail"`

		// Status HTTP statuscode
		Status float32 `json:"status"`

		// Title A short, human-readable summary of the problem type.
		Title string `json:"title"`
	}
}

func ParseVerifySignatureResponse

func ParseVerifySignatureResponse(rsp *http.Response) (*VerifySignatureResponse, error)

ParseVerifySignatureResponse parses an HTTP response from a VerifySignatureWithResponse call

func (VerifySignatureResponse) Status

func (r VerifySignatureResponse) Status() string

Status returns HTTPResponse.Status

func (VerifySignatureResponse) StatusCode

func (r VerifySignatureResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

Jump to

Keyboard shortcuts

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