form3

package
v6.5.2 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2023 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ReqMimeType = "application/vnd.api+json"
	UserAgent   = "go-form3-client"
)

Variables

View Source
var ErrPEMDecode = errors.New("failed to decode PEM block containing private key")

Functions

func NewMTLSTransport

func NewMTLSTransport(opts ...MTLSOption) http.RoundTripper

Types

type ClientDefaults

type ClientDefaults struct {
	OrganisationID *strfmt.UUID
}

func NewClientDefaults

func NewClientDefaults() *ClientDefaults

func (*ClientDefaults) GetBool

func (*ClientDefaults) GetBool(objectName, attributeName string) bool

func (*ClientDefaults) GetBoolPtr

func (*ClientDefaults) GetBoolPtr(objectName, attributeName string) *bool

func (*ClientDefaults) GetFloat64

func (*ClientDefaults) GetFloat64(objectName, attributeName string) float64

func (*ClientDefaults) GetFloat64Ptr

func (*ClientDefaults) GetFloat64Ptr(objectName, attributeName string) *float64

func (*ClientDefaults) GetInt32

func (*ClientDefaults) GetInt32(objectName, attributeName string) int32

func (*ClientDefaults) GetInt64

func (*ClientDefaults) GetInt64(objectName, attributeName string) int64

func (*ClientDefaults) GetInt64Ptr

func (*ClientDefaults) GetInt64Ptr(objectName, attributeName string) *int64

func (*ClientDefaults) GetMapStringInterface

func (*ClientDefaults) GetMapStringInterface(objectName, attributeName string) map[string]interface{}

func (*ClientDefaults) GetStrfmtDate

func (*ClientDefaults) GetStrfmtDate(objectName, attributeName string) strfmt.Date

func (*ClientDefaults) GetStrfmtDatePtr

func (*ClientDefaults) GetStrfmtDatePtr(objectName, attributeName string) *strfmt.Date

func (*ClientDefaults) GetStrfmtDateTime

func (*ClientDefaults) GetStrfmtDateTime(objectName, attributeName string) strfmt.DateTime

func (*ClientDefaults) GetStrfmtDateTimePtr

func (*ClientDefaults) GetStrfmtDateTimePtr(objectName, attributeName string) *strfmt.DateTime

func (*ClientDefaults) GetStrfmtURI

func (*ClientDefaults) GetStrfmtURI(objectName, attributeName string) strfmt.URI

func (*ClientDefaults) GetStrfmtURIPtr

func (*ClientDefaults) GetStrfmtURIPtr(objectName, attributeName string) *strfmt.URI

func (*ClientDefaults) GetStrfmtUUID

func (d *ClientDefaults) GetStrfmtUUID(objectName, attributeName string) strfmt.UUID

func (*ClientDefaults) GetStrfmtUUIDPtr

func (d *ClientDefaults) GetStrfmtUUIDPtr(objectName, attributeName string) *strfmt.UUID

func (*ClientDefaults) GetString

func (*ClientDefaults) GetString(objectName, attributeName string) string

func (*ClientDefaults) GetStringArray

func (*ClientDefaults) GetStringArray(objectName, attributeName string) []string

func (*ClientDefaults) GetStringPtr

func (*ClientDefaults) GetStringPtr(objectName, attributeName string) *string

type ErrMissingEnvVariable

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

func (*ErrMissingEnvVariable) Error

func (e *ErrMissingEnvVariable) Error() string

type F3

type F3 struct {
	genClient.Form3PublicAPI
	// contains filtered or unexported fields
}

func New

func New(opts ...Option) (*F3, error)

func NewFromEnv

func NewFromEnv() (*F3, error)

type MTLSOption

type MTLSOption func(transport *MTLSTransportBuilder)

func WithCertificate

func WithCertificate(c tls.Certificate) MTLSOption

func WithIgnoreSkipVerify

func WithIgnoreSkipVerify(skip bool) MTLSOption

type MTLSTransportBuilder

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

type Option

type Option func(*F3)

func WithBaseURL

func WithBaseURL(u url.URL) Option

func WithHTTPClient

func WithHTTPClient(c *http.Client) Option

func WithOrganisationID

func WithOrganisationID(u uuid.UUID) Option

func WithRequestSigningTransport

func WithRequestSigningTransport(opts ...RequestSigningOption) Option

func WithTokenTransport

func WithTokenTransport(opts ...TokenOption) Option

type RequestSigningOption

type RequestSigningOption func(*RequestSigningTransport)

func WithPrivateKey

func WithPrivateKey(key *rsa.PrivateKey) RequestSigningOption

func WithPublicKeyID

func WithPublicKeyID(keyID uuid.UUID) RequestSigningOption

func WithUnderlyingRequestSigningTransport

func WithUnderlyingRequestSigningTransport(tr http.RoundTripper) RequestSigningOption

func WithUserAgent added in v6.4.0

func WithUserAgent(ua string) RequestSigningOption

type RequestSigningTransport

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

func NewRequestSigningTransport

func NewRequestSigningTransport(opts ...RequestSigningOption) *RequestSigningTransport

func (*RequestSigningTransport) RoundTrip

func (t *RequestSigningTransport) RoundTrip(req *http.Request) (*http.Response, error)

type TokenOption

type TokenOption func(*TokenTransport)

func WithClientID deprecated

func WithClientID(clientID uuid.UUID) TokenOption

Deprecated: token based authentication is deprecated and will be removed at some point in the future in favour of request signing.

func WithClientSecret deprecated

func WithClientSecret(secret string) TokenOption

Deprecated: token based authentication is deprecated and will be removed at some point in the future in favour of request signing.

func WithInitialToken deprecated

func WithInitialToken(token string) TokenOption

Deprecated: token based authentication is deprecated and will be removed at some point in the future in favour of request signing.

func WithUnderlyingTokenTransport deprecated

func WithUnderlyingTokenTransport(tr http.RoundTripper) TokenOption

Deprecated: token based authentication is deprecated and will be removed at some point in the future in favour of request signing.

type TokenTransport

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

func NewTokenTransport deprecated

func NewTokenTransport(opts ...TokenOption) *TokenTransport

Deprecated: token based authentication is deprecated and will be removed at some point in the future in favour of request signing.

func (*TokenTransport) RoundTrip

func (t *TokenTransport) RoundTrip(req *http.Request) (*http.Response, error)

Jump to

Keyboard shortcuts

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