uid

package
v0.0.0-...-897bb11 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func New

func New(baseURL string, httpClient Doer, cfg aws.Config, signer v4Signer, now func() time.Time) *Client

func (*Client) CreateCase

func (c *Client) CreateCase(ctx context.Context, body *CreateCaseRequestBody) (CreateCaseResponse, error)

func (*Client) Health

func (c *Client) Health(ctx context.Context) (*http.Response, error)

type CreateCaseRequestBody

type CreateCaseRequestBody struct {
	Type   string       `json:"type"`
	Source string       `json:"source"`
	Donor  DonorDetails `json:"donor"`
}

func (CreateCaseRequestBody) Valid

func (b CreateCaseRequestBody) Valid() bool

type CreateCaseResponse

type CreateCaseResponse struct {
	UID              string                              `json:"uid"`
	BadRequestErrors []CreateCaseResponseBadRequestError `json:"errors"`
}

func (*CreateCaseResponse) Error

func (c *CreateCaseResponse) Error() error

type CreateCaseResponseBadRequestError

type CreateCaseResponseBadRequestError struct {
	Source string `json:"source"`
	Detail string `json:"detail"`
}

type Doer

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

type DonorDetails

type DonorDetails struct {
	Name     string  `json:"name"`
	Dob      ISODate `json:"dob"`
	Postcode string  `json:"postcode"`
}

type ISODate

type ISODate struct {
	time.Time
}

func (ISODate) MarshalJSON

func (d ISODate) MarshalJSON() ([]byte, error)

Jump to

Keyboard shortcuts

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