api

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2021 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package api contains autogenerated REST client.

Index

Constants

View Source
const DefaultBaseURL = "https://api.tech26.de/"

DefaultBaseURL is the default base URL for this service.

Variables

This section is empty.

Functions

This section is empty.

Types

type BadCredentialsError

type BadCredentialsError struct {
	Status           int64       `json:"status,omitempty"`
	Detail           string      `json:"detail,omitempty"`
	Type             string      `json:"type,omitempty"`
	UserMessage      UserMessage `json:"userMessage"` // Required.
	Error            string      `json:"error,omitempty"`
	ErrorDescription string      `json:"error_description,omitempty"`
}

BadCredentialsError structure is generated from "#/components/schemas/BadCredentialsError".

type Client

type Client struct {
	BaseURL string
	Timeout time.Duration
	// InstrumentCtxFunc allows adding operation info to context.
	// A pointer to request structure passed into the function.
	// Nil value is ignored.
	InstrumentCtxFunc func(ctx context.Context, method, pattern string, reqStruct interface{}) context.Context
	// contains filtered or unexported fields
}

Client is a REST service HTTP client.

func NewClient

func NewClient() *Client

NewClient creates client instance with default transport.

func (*Client) GetAPISmrtTransactions

func (c *Client) GetAPISmrtTransactions(ctx context.Context, request GetAPISmrtTransactionsRequest) (result GetAPISmrtTransactionsResponse, err error)

GetAPISmrtTransactions performs REST operation.

func (*Client) PostAPIMfaChallenge

func (c *Client) PostAPIMfaChallenge(ctx context.Context, request PostAPIMfaChallengeRequest) (result PostAPIMfaChallengeResponse, err error)

PostAPIMfaChallenge performs REST operation.

func (*Client) PostOauthToken

func (c *Client) PostOauthToken(ctx context.Context, request PostOauthTokenRequest) (result PostOauthTokenResponse, err error)

PostOauthToken performs REST operation.

func (*Client) SetTransport

func (c *Client) SetTransport(transport http.RoundTripper)

SetTransport sets client transport.

type GetAPISmrtTransactionsRequest

type GetAPISmrtTransactionsRequest struct {
	// From is an optional `from` parameter in query.
	// Timestamp - milliseconds since 1970 in CET
	From *int64
	To   *int64 // To is an optional `to` parameter in query.
	// Limit is an optional `limit` parameter in query.
	// Limit the number of transactions to return
	Limit   *int64
	Pending *bool // Pending is an optional `pending` parameter in query.
	// Categories is an optional `categories` parameter in query.
	// Comma separated list of category IDs
	Categories *string
	// TextFilter is an optional `textFilter` parameter in query.
	// Query string to search for
	TextFilter *string
	LastID     *string // LastID is an optional `lastId` parameter in query.
}

GetAPISmrtTransactionsRequest is operation request value.

type GetAPISmrtTransactionsResponse

type GetAPISmrtTransactionsResponse struct {
	StatusCode        int
	ValueOK           []transaction.Transaction // ValueOK is a value of 200 OK response.
	ValueUnauthorized *InvalidTokenError        // ValueUnauthorized is a value of 401 Unauthorized response.
}

GetAPISmrtTransactionsResponse is operation response value.

type InvalidTokenError

type InvalidTokenError struct {
	Status           int64       `json:"status,omitempty"`
	Detail           string      `json:"detail,omitempty"`
	Type             string      `json:"type,omitempty"`
	UserMessage      UserMessage `json:"userMessage"` // Required.
	Error            string      `json:"error,omitempty"`
	ErrorDescription string      `json:"error_description,omitempty"`
}

InvalidTokenError structure is generated from "#/components/schemas/InvalidTokenError".

type MFAChallengeRequest

type MFAChallengeRequest struct {
	ChallengeType string `json:"challengeType"` // Required.
	MfaToken      string `json:"mfaToken"`      // Required.
}

MFAChallengeRequest structure is generated from "#/components/schemas/MFAChallengeRequest".

type PostAPIMfaChallengeRequest

type PostAPIMfaChallengeRequest struct {
	DeviceToken string               // DeviceToken is a required `device-token` parameter in header.
	Body        *MFAChallengeRequest // Body is a JSON request body.
}

PostAPIMfaChallengeRequest is operation request value.

type PostAPIMfaChallengeResponse

type PostAPIMfaChallengeResponse struct {
	StatusCode        int
	ValueCreated      *PostAPIMfaChallengeResponseValueCreated // ValueCreated is a value of 201 Created response.
	ValueBadRequest   *BadCredentialsError                     // ValueBadRequest is a value of 400 Bad Request response.
	ValueUnauthorized *UnauthorizedMfaChallengeError           // ValueUnauthorized is a value of 401 Unauthorized response.
}

PostAPIMfaChallengeResponse is operation response value.

type PostAPIMfaChallengeResponseValueCreated

type PostAPIMfaChallengeResponseValueCreated struct {
	ChallengeType string `json:"challengeType,omitempty"`
}

PostAPIMfaChallengeResponseValueCreated structure is generated from "PostAPIMfaChallenge/response/ValueCreated".

type PostOauthTokenRequest

type PostOauthTokenRequest struct {
	DeviceToken  string  // DeviceToken is a required `device-token` parameter in header.
	GrantType    string  // GrantType is a required `grant_type` parameter in formData.
	Username     *string // Username is an optional `username` parameter in formData.
	Password     *string // Password is an optional `password` parameter in formData.
	MfaToken     *string // MfaToken is an optional `mfaToken` parameter in formData.
	RefreshToken *string // RefreshToken is an optional `refresh_token` parameter in formData.
}

PostOauthTokenRequest is operation request value.

type PostOauthTokenResponse

type PostOauthTokenResponse struct {
	StatusCode           int
	ValueOK              *TokenResponse             // ValueOK is a value of 200 OK response.
	ValueBadRequest      *BadCredentialsError       // ValueBadRequest is a value of 400 Bad Request response.
	ValueUnauthorized    *UnauthorizedAuthError     // ValueUnauthorized is a value of 401 Unauthorized response.
	ValueForbidden       *RequiredMFATokenError     // ValueForbidden is a value of 403 Forbidden response.
	ValueTooManyRequests *TooManyLoginAttemptsError // ValueTooManyRequests is a value of 429 Too Many Requests response.
}

PostOauthTokenResponse is operation response value.

type RequiredMFATokenError

type RequiredMFATokenError struct {
	UserMessage UserMessage `json:"userMessage"` // Required.
	// Format: uuid.
	// Required.
	MfaToken         string `json:"mfaToken"`
	ErrorDescription string `json:"error_description,omitempty"`
	Detail           string `json:"detail,omitempty"`
	HostURL          string `json:"hostUrl,omitempty"`
	Type             string `json:"type,omitempty"`
	Error            string `json:"error,omitempty"`
	Title            string `json:"title,omitempty"`
	Message          string `json:"message,omitempty"`
	// Format: uuid.
	// Required.
	UserID string `json:"userId"`
	Status int64  `json:"status,omitempty"`
}

RequiredMFATokenError structure is generated from "#/components/schemas/RequiredMFATokenError".

type TokenResponse

type TokenResponse struct {
	AccessToken  string `json:"access_token"` // Required.
	TokenType    string `json:"token_type,omitempty"`
	RefreshToken string `json:"refresh_token"` // Required.
	ExpiresIn    int64  `json:"expires_in"`    // Required.
	HostURL      string `json:"host_url,omitempty"`
}

TokenResponse structure is generated from "#/components/schemas/TokenResponse".

type TooManyLoginAttemptsError

type TooManyLoginAttemptsError struct {
	Status      int64       `json:"status,omitempty"`
	Detail      string      `json:"detail,omitempty"`
	UserMessage UserMessage `json:"userMessage"` // Required.
	Error       string      `json:"error,omitempty"`
	Title       string      `json:"title,omitempty"`
	Message     string      `json:"message,omitempty"`
}

TooManyLoginAttemptsError structure is generated from "#/components/schemas/TooManyLoginAttemptsError".

type UnauthorizedAuthError

type UnauthorizedAuthError struct {
	Status           int64       `json:"status,omitempty"`
	Detail           string      `json:"detail,omitempty"`
	Type             string      `json:"type,omitempty"`
	UserMessage      UserMessage `json:"userMessage"` // Required.
	Error            string      `json:"error,omitempty"`
	ErrorDescription string      `json:"error_description,omitempty"`
}

UnauthorizedAuthError structure is generated from "#/components/schemas/UnauthorizedAuthError".

type UnauthorizedMfaChallengeError

type UnauthorizedMfaChallengeError struct {
	Timestamp *time.Time `json:"timestamp,omitempty"` // Format: date-time.
	Status    int64      `json:"status,omitempty"`
	Error     string     `json:"error,omitempty"`
	Message   string     `json:"message,omitempty"`
	Path      string     `json:"path,omitempty"`
}

UnauthorizedMfaChallengeError structure is generated from "#/components/schemas/UnauthorizedMfaChallengeError".

type UserMessage

type UserMessage struct {
	Title  string `json:"title,omitempty"`
	Detail string `json:"detail,omitempty"`
}

UserMessage structure is generated from "#/components/schemas/UserMessage".

Jump to

Keyboard shortcuts

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