oapi

package
v0.0.0-...-070e9cc Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Overview

Package oapi 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.

Package oapi 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 (
	BearerAuthScopes = "bearerAuth.Scopes"
)

Variables

This section is empty.

Functions

func GetSwagger

func GetSwagger() (swagger *openapi3.T, err error)

GetSwagger returns the Swagger specification corresponding to the generated code in this file. The external references of Swagger specification are resolved. The logic of resolving external references is tightly connected to "import-mapping" feature. Externally referenced files must be embedded in the corresponding golang packages. Urls can be supported but this task was out of the scope.

func PathToRawSpec

func PathToRawSpec(pathToFile string) map[string]func() ([]byte, error)

Constructs a synthetic filesystem for resolving external references when loading openapi specifications.

func RegisterHandlers

func RegisterHandlers(router EchoRouter, si ServerInterface)

RegisterHandlers adds each server route to the EchoRouter.

func RegisterHandlersWithBaseURL

func RegisterHandlersWithBaseURL(router EchoRouter, si ServerInterface, baseURL string)

Registers handlers, and prepends BaseURL to the paths, so that the paths can be served under a prefix.

Types

type CashbunnyAccount

type CashbunnyAccount struct {
	Amount        *float64 `json:"amount"`
	AmountDisplay *string  `json:"amount_display"`
	Category      string   `json:"category"`
	CreatedAt     string   `json:"created_at"`
	Currency      string   `json:"currency"`
	Description   string   `json:"description"`
	Id            uint32   `json:"id"`
	Name          string   `json:"name"`
	OrderIndex    uint32   `json:"order_index"`
	Type          string   `json:"type"`
	UpdatedAt     string   `json:"updated_at"`
}

CashbunnyAccount Model representing any financial account such as bank account, credit card, wallet etc.

type CashbunnyOverview

type CashbunnyOverview struct {
	AssetAccounts []CashbunnyAccount `json:"asset_accounts"`

	// From Overview target start time
	From              string             `json:"from"`
	LiabilityAccounts []CashbunnyAccount `json:"liability_accounts"`

	// NetWorth Net worth per currency
	NetWorth map[string]string `json:"net_worth"`

	// ProfitLossSummary User's profit/loss summary within the timeframe
	ProfitLossSummary map[string]struct {
		Expense string `json:"expense"`
		Profit  string `json:"profit"`
		Revenue string `json:"revenue"`
	} `json:"profit_loss_summary"`

	// To Overview target end time
	To                        string                 `json:"to"`
	Transactions              []CashbunnyTransaction `json:"transactions"`
	TransactionsFromScheduled []CashbunnyTransaction `json:"transactions_from_scheduled"`
}

CashbunnyOverview Overview of user's budget keeping.

type CashbunnyRecurrenceRule

type CashbunnyRecurrenceRule struct {
	Count    int    `json:"count"`
	Dtstart  string `json:"dtstart"`
	Freq     string `json:"freq"`
	Interval int    `json:"interval"`
	Until    string `json:"until"`
}

CashbunnyRecurrenceRule Model representing iCalendar recurrence rule (https://datatracker.ietf.org/doc/html/rfc5545)

type CashbunnyScheduledTransaction

type CashbunnyScheduledTransaction struct {
	Amount                 float64 `json:"amount"`
	AmountDisplay          string  `json:"amount_display"`
	CreatedAt              string  `json:"created_at"`
	Currency               string  `json:"currency"`
	Description            string  `json:"description"`
	DestinationAccountId   uint32  `json:"destination_account_id"`
	DestinationAccountName string  `json:"destination_account_name"`
	Id                     uint32  `json:"id"`

	// RecurrenceRule Model representing iCalendar recurrence rule (https://datatracker.ietf.org/doc/html/rfc5545)
	RecurrenceRule    CashbunnyRecurrenceRule `json:"recurrence_rule"`
	SourceAccountId   uint32                  `json:"source_account_id"`
	SourceAccountName string                  `json:"source_account_name"`
	UpdatedAt         string                  `json:"updated_at"`
}

CashbunnyScheduledTransaction Model representing a scheduled transaction

type CashbunnyTransaction

type CashbunnyTransaction struct {
	Amount                 float64 `json:"amount"`
	AmountDisplay          string  `json:"amount_display"`
	CreatedAt              string  `json:"created_at"`
	Currency               string  `json:"currency"`
	Description            string  `json:"description"`
	DestinationAccountId   uint32  `json:"destination_account_id"`
	DestinationAccountName string  `json:"destination_account_name"`
	Id                     uint32  `json:"id"`

	// ScheduledTransaction Model representing a scheduled transaction
	ScheduledTransaction CashbunnyScheduledTransaction `json:"scheduled_transaction"`
	SourceAccountId      uint32                        `json:"source_account_id"`
	SourceAccountName    string                        `json:"source_account_name"`
	TransactedAt         string                        `json:"transacted_at"`
	UpdatedAt            string                        `json:"updated_at"`
}

CashbunnyTransaction Model representing a single atomic financial transaction between accounts

type CashbunnyUserPreference

type CashbunnyUserPreference struct {
	UserCurrencies []string `json:"user_currencies"`
}

CashbunnyUserPreference Model defining user's Cashbunny preferences such as default currency etc.

type CreateCashbunnyAccount200Response

type CreateCashbunnyAccount200Response struct {
}

func (CreateCashbunnyAccount200Response) VisitCreateCashbunnyAccountResponse

func (response CreateCashbunnyAccount200Response) VisitCreateCashbunnyAccountResponse(w http.ResponseWriter) error

type CreateCashbunnyAccount400JSONResponse

type CreateCashbunnyAccount400JSONResponse Error

func (CreateCashbunnyAccount400JSONResponse) VisitCreateCashbunnyAccountResponse

func (response CreateCashbunnyAccount400JSONResponse) VisitCreateCashbunnyAccountResponse(w http.ResponseWriter) error

type CreateCashbunnyAccountJSONBody

type CreateCashbunnyAccountJSONBody struct {
	// Category Category of the account.
	Category    string `json:"category" validate:"required,oneof=assets liabilities revenues expenses"`
	Currency    string `json:"currency" validate:"required,_cashbunny_currency"`
	Description string `json:"description" validate:"required,max=200"`

	// Name Name of the account to save
	Name string `json:"name" validate:"required,max=100"`

	// OrderIndex Order of the record to be placed in
	OrderIndex *uint32 `json:"order_index"`
}

CreateCashbunnyAccountJSONBody defines parameters for CreateCashbunnyAccount.

type CreateCashbunnyAccountJSONRequestBody

type CreateCashbunnyAccountJSONRequestBody CreateCashbunnyAccountJSONBody

CreateCashbunnyAccountJSONRequestBody defines body for CreateCashbunnyAccount for application/json ContentType.

type CreateCashbunnyAccountRequestObject

type CreateCashbunnyAccountRequestObject struct {
	Body *CreateCashbunnyAccountJSONRequestBody
}

type CreateCashbunnyAccountResponseObject

type CreateCashbunnyAccountResponseObject interface {
	VisitCreateCashbunnyAccountResponse(w http.ResponseWriter) error
}

type CreateCashbunnyDefaultUserPreference200JSONResponse

type CreateCashbunnyDefaultUserPreference200JSONResponse struct {
	// UserPreference Model defining user's Cashbunny preferences such as default currency etc.
	UserPreference CashbunnyUserPreference `json:"user_preference"`
}

func (CreateCashbunnyDefaultUserPreference200JSONResponse) VisitCreateCashbunnyDefaultUserPreferenceResponse

func (response CreateCashbunnyDefaultUserPreference200JSONResponse) VisitCreateCashbunnyDefaultUserPreferenceResponse(w http.ResponseWriter) error

type CreateCashbunnyDefaultUserPreferenceRequestObject

type CreateCashbunnyDefaultUserPreferenceRequestObject struct {
}

type CreateCashbunnyDefaultUserPreferenceResponseObject

type CreateCashbunnyDefaultUserPreferenceResponseObject interface {
	VisitCreateCashbunnyDefaultUserPreferenceResponse(w http.ResponseWriter) error
}

type CreateCashbunnyTransaction200Response

type CreateCashbunnyTransaction200Response struct {
}

func (CreateCashbunnyTransaction200Response) VisitCreateCashbunnyTransactionResponse

func (response CreateCashbunnyTransaction200Response) VisitCreateCashbunnyTransactionResponse(w http.ResponseWriter) error

type CreateCashbunnyTransaction400JSONResponse

type CreateCashbunnyTransaction400JSONResponse Error

func (CreateCashbunnyTransaction400JSONResponse) VisitCreateCashbunnyTransactionResponse

func (response CreateCashbunnyTransaction400JSONResponse) VisitCreateCashbunnyTransactionResponse(w http.ResponseWriter) error

type CreateCashbunnyTransactionJSONBody

type CreateCashbunnyTransactionJSONBody struct {
	Amount      float64 `json:"amount" validate:"required,min=0"`
	Currency    string  `json:"currency" validate:"required,_cashbunny_currency"`
	Description string  `json:"description" validate:"required,max=100"`

	// DestinationAccountId Money from
	DestinationAccountId uint32 `json:"destination_account_id" validate:"required"`

	// SourceAccountId Money from
	SourceAccountId uint32 `json:"source_account_id" validate:"required"`

	// TransactedAt ISO8601 compatible time string for transaction datetime
	TransactedAt string `json:"transacted_at" validate:"required,_iso8601"`
}

CreateCashbunnyTransactionJSONBody defines parameters for CreateCashbunnyTransaction.

type CreateCashbunnyTransactionJSONRequestBody

type CreateCashbunnyTransactionJSONRequestBody CreateCashbunnyTransactionJSONBody

CreateCashbunnyTransactionJSONRequestBody defines body for CreateCashbunnyTransaction for application/json ContentType.

type CreateCashbunnyTransactionRequestObject

type CreateCashbunnyTransactionRequestObject struct {
	Body *CreateCashbunnyTransactionJSONRequestBody
}

type CreateCashbunnyTransactionResponseObject

type CreateCashbunnyTransactionResponseObject interface {
	VisitCreateCashbunnyTransactionResponse(w http.ResponseWriter) error
}

type CreateDefaultUserSystemPreference200JSONResponse

type CreateDefaultUserSystemPreference200JSONResponse struct {
	// UserSystemPreference Model defining user system preferences such as language, time zone etc.
	UserSystemPreference UserSystemPreference `json:"user_system_preference"`
}

func (CreateDefaultUserSystemPreference200JSONResponse) VisitCreateDefaultUserSystemPreferenceResponse

func (response CreateDefaultUserSystemPreference200JSONResponse) VisitCreateDefaultUserSystemPreferenceResponse(w http.ResponseWriter) error

type CreateDefaultUserSystemPreferenceRequestObject

type CreateDefaultUserSystemPreferenceRequestObject struct {
}

type CreateDefaultUserSystemPreferenceResponseObject

type CreateDefaultUserSystemPreferenceResponseObject interface {
	VisitCreateDefaultUserSystemPreferenceResponse(w http.ResponseWriter) error
}

type CreateJWTRefreshToken200Response

type CreateJWTRefreshToken200Response struct {
	Headers CreateJWTRefreshToken200ResponseHeaders
}

func (CreateJWTRefreshToken200Response) VisitCreateJWTRefreshTokenResponse

func (response CreateJWTRefreshToken200Response) VisitCreateJWTRefreshTokenResponse(w http.ResponseWriter) error

type CreateJWTRefreshToken200ResponseHeaders

type CreateJWTRefreshToken200ResponseHeaders struct {
	SetCookie string
}

type CreateJWTRefreshToken403JSONResponse

type CreateJWTRefreshToken403JSONResponse Error

func (CreateJWTRefreshToken403JSONResponse) VisitCreateJWTRefreshTokenResponse

func (response CreateJWTRefreshToken403JSONResponse) VisitCreateJWTRefreshTokenResponse(w http.ResponseWriter) error

type CreateJWTRefreshTokenRequestObject

type CreateJWTRefreshTokenRequestObject struct {
}

type CreateJWTRefreshTokenResponseObject

type CreateJWTRefreshTokenResponseObject interface {
	VisitCreateJWTRefreshTokenResponse(w http.ResponseWriter) error
}

type CreateJWTToken200Response

type CreateJWTToken200Response struct {
	Headers CreateJWTToken200ResponseHeaders
}

func (CreateJWTToken200Response) VisitCreateJWTTokenResponse

func (response CreateJWTToken200Response) VisitCreateJWTTokenResponse(w http.ResponseWriter) error

type CreateJWTToken200ResponseHeaders

type CreateJWTToken200ResponseHeaders struct {
	SetCookie string
}

type CreateJWTToken400JSONResponse

type CreateJWTToken400JSONResponse Error

func (CreateJWTToken400JSONResponse) VisitCreateJWTTokenResponse

func (response CreateJWTToken400JSONResponse) VisitCreateJWTTokenResponse(w http.ResponseWriter) error

type CreateJWTToken403JSONResponse

type CreateJWTToken403JSONResponse Error

func (CreateJWTToken403JSONResponse) VisitCreateJWTTokenResponse

func (response CreateJWTToken403JSONResponse) VisitCreateJWTTokenResponse(w http.ResponseWriter) error

type CreateJWTTokenJSONBody

type CreateJWTTokenJSONBody struct {
	Password string `json:"password"`

	// Username must be alphanumerical characters, with maximum 50 character count
	Username string `json:"username" validate:"alphanum,max=50"`
}

CreateJWTTokenJSONBody defines parameters for CreateJWTToken.

type CreateJWTTokenJSONRequestBody

type CreateJWTTokenJSONRequestBody CreateJWTTokenJSONBody

CreateJWTTokenJSONRequestBody defines body for CreateJWTToken for application/json ContentType.

type CreateJWTTokenRequestObject

type CreateJWTTokenRequestObject struct {
	Body *CreateJWTTokenJSONRequestBody
}

type CreateJWTTokenResponseObject

type CreateJWTTokenResponseObject interface {
	VisitCreateJWTTokenResponse(w http.ResponseWriter) error
}

type CreateUser202Response

type CreateUser202Response struct {
}

func (CreateUser202Response) VisitCreateUserResponse

func (response CreateUser202Response) VisitCreateUserResponse(w http.ResponseWriter) error

type CreateUser400JSONResponse

type CreateUser400JSONResponse Error

func (CreateUser400JSONResponse) VisitCreateUserResponse

func (response CreateUser400JSONResponse) VisitCreateUserResponse(w http.ResponseWriter) error

type CreateUserJSONBody

type CreateUserJSONBody struct {
	// Email must be a valid email
	Email string `json:"email" validate:"email"`

	// Password must be between 8 to 72 characters, and contain a letter, number and a special character
	Password string `json:"password" validate:"_password"`

	// Username must be between 3 to 50 alphanumerical characters
	Username string `json:"username" validate:"alphanum,min=3,max=50"`
}

CreateUserJSONBody defines parameters for CreateUser.

type CreateUserJSONRequestBody

type CreateUserJSONRequestBody CreateUserJSONBody

CreateUserJSONRequestBody defines body for CreateUser for application/json ContentType.

type CreateUserRequestObject

type CreateUserRequestObject struct {
	Body *CreateUserJSONRequestBody
}

type CreateUserResponseObject

type CreateUserResponseObject interface {
	VisitCreateUserResponse(w http.ResponseWriter) error
}

type DeleteCashbunnyAccount200Response

type DeleteCashbunnyAccount200Response struct {
}

func (DeleteCashbunnyAccount200Response) VisitDeleteCashbunnyAccountResponse

func (response DeleteCashbunnyAccount200Response) VisitDeleteCashbunnyAccountResponse(w http.ResponseWriter) error

type DeleteCashbunnyAccountRequestObject

type DeleteCashbunnyAccountRequestObject struct {
	AccountId uint32 `json:"accountId"`
}

type DeleteCashbunnyAccountResponseObject

type DeleteCashbunnyAccountResponseObject interface {
	VisitDeleteCashbunnyAccountResponse(w http.ResponseWriter) error
}

type DeleteCashbunnyTransaction200Response

type DeleteCashbunnyTransaction200Response struct {
}

func (DeleteCashbunnyTransaction200Response) VisitDeleteCashbunnyTransactionResponse

func (response DeleteCashbunnyTransaction200Response) VisitDeleteCashbunnyTransactionResponse(w http.ResponseWriter) error

type DeleteCashbunnyTransactionRequestObject

type DeleteCashbunnyTransactionRequestObject struct {
	TransactionId uint32 `json:"transactionId"`
}

type DeleteCashbunnyTransactionResponseObject

type DeleteCashbunnyTransactionResponseObject interface {
	VisitDeleteCashbunnyTransactionResponse(w http.ResponseWriter) error
}

type DeleteJWTRefreshToken204Response

type DeleteJWTRefreshToken204Response struct {
	Headers DeleteJWTRefreshToken204ResponseHeaders
}

func (DeleteJWTRefreshToken204Response) VisitDeleteJWTRefreshTokenResponse

func (response DeleteJWTRefreshToken204Response) VisitDeleteJWTRefreshTokenResponse(w http.ResponseWriter) error

type DeleteJWTRefreshToken204ResponseHeaders

type DeleteJWTRefreshToken204ResponseHeaders struct {
	SetCookie string
}

type DeleteJWTRefreshTokenRequestObject

type DeleteJWTRefreshTokenRequestObject struct {
}

type DeleteJWTRefreshTokenResponseObject

type DeleteJWTRefreshTokenResponseObject interface {
	VisitDeleteJWTRefreshTokenResponse(w http.ResponseWriter) error
}

type DeleteJWTToken204Response

type DeleteJWTToken204Response struct {
	Headers DeleteJWTToken204ResponseHeaders
}

func (DeleteJWTToken204Response) VisitDeleteJWTTokenResponse

func (response DeleteJWTToken204Response) VisitDeleteJWTTokenResponse(w http.ResponseWriter) error

type DeleteJWTToken204ResponseHeaders

type DeleteJWTToken204ResponseHeaders struct {
	SetCookie string
}

type DeleteJWTTokenRequestObject

type DeleteJWTTokenRequestObject struct {
}

type DeleteJWTTokenResponseObject

type DeleteJWTTokenResponseObject interface {
	VisitDeleteJWTTokenResponse(w http.ResponseWriter) error
}

type EchoRouter

type EchoRouter interface {
	CONNECT(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	DELETE(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	GET(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	HEAD(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	OPTIONS(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	PATCH(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	POST(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	PUT(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	TRACE(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
}

This is a simple interface which specifies echo.Route addition functions which are present on both echo.Echo and echo.Group, since we want to allow using either of them for path registration

type Error

type Error struct {
	// Message A useful message describing the error
	Message            string            `json:"message"`
	ValidationMessages map[string]string `json:"validation_messages"`
}

Error Error code and underlying errors

type GetCashbunnyAccounts200JSONResponse

type GetCashbunnyAccounts200JSONResponse struct {
	Accounts []CashbunnyAccount `json:"accounts"`
}

func (GetCashbunnyAccounts200JSONResponse) VisitGetCashbunnyAccountsResponse

func (response GetCashbunnyAccounts200JSONResponse) VisitGetCashbunnyAccountsResponse(w http.ResponseWriter) error

type GetCashbunnyAccountsRequestObject

type GetCashbunnyAccountsRequestObject struct {
}

type GetCashbunnyAccountsResponseObject

type GetCashbunnyAccountsResponseObject interface {
	VisitGetCashbunnyAccountsResponse(w http.ResponseWriter) error
}

type GetCashbunnyOverview200JSONResponse

type GetCashbunnyOverview200JSONResponse CashbunnyOverview

func (GetCashbunnyOverview200JSONResponse) VisitGetCashbunnyOverviewResponse

func (response GetCashbunnyOverview200JSONResponse) VisitGetCashbunnyOverviewResponse(w http.ResponseWriter) error

type GetCashbunnyOverviewParams

type GetCashbunnyOverviewParams struct {
	// From Overview timeframe's start date
	From *int64 `form:"from,omitempty" json:"from,omitempty"`

	// To Overview timeframe's end date
	To *int64 `form:"to,omitempty" json:"to,omitempty"`
}

GetCashbunnyOverviewParams defines parameters for GetCashbunnyOverview.

type GetCashbunnyOverviewRequestObject

type GetCashbunnyOverviewRequestObject struct {
	Params GetCashbunnyOverviewParams
}

type GetCashbunnyOverviewResponseObject

type GetCashbunnyOverviewResponseObject interface {
	VisitGetCashbunnyOverviewResponse(w http.ResponseWriter) error
}

type GetCashbunnySupportedCurrencies200JSONResponse

type GetCashbunnySupportedCurrencies200JSONResponse struct {
	CurrenciesAndGrapheme map[string]string `json:"currencies_and_grapheme"`
}

func (GetCashbunnySupportedCurrencies200JSONResponse) VisitGetCashbunnySupportedCurrenciesResponse

func (response GetCashbunnySupportedCurrencies200JSONResponse) VisitGetCashbunnySupportedCurrenciesResponse(w http.ResponseWriter) error

type GetCashbunnySupportedCurrenciesRequestObject

type GetCashbunnySupportedCurrenciesRequestObject struct {
}

type GetCashbunnySupportedCurrenciesResponseObject

type GetCashbunnySupportedCurrenciesResponseObject interface {
	VisitGetCashbunnySupportedCurrenciesResponse(w http.ResponseWriter) error
}

type GetCashbunnyTransactions200JSONResponse

type GetCashbunnyTransactions200JSONResponse struct {
	Transactions []CashbunnyTransaction `json:"transactions"`
}

func (GetCashbunnyTransactions200JSONResponse) VisitGetCashbunnyTransactionsResponse

func (response GetCashbunnyTransactions200JSONResponse) VisitGetCashbunnyTransactionsResponse(w http.ResponseWriter) error

type GetCashbunnyTransactionsRequestObject

type GetCashbunnyTransactionsRequestObject struct {
}

type GetCashbunnyTransactionsResponseObject

type GetCashbunnyTransactionsResponseObject interface {
	VisitGetCashbunnyTransactionsResponse(w http.ResponseWriter) error
}

type GetCashbunnyUserPreference200JSONResponse

type GetCashbunnyUserPreference200JSONResponse struct {
	// UserPreference Model defining user's Cashbunny preferences such as default currency etc.
	UserPreference CashbunnyUserPreference `json:"user_preference"`
}

func (GetCashbunnyUserPreference200JSONResponse) VisitGetCashbunnyUserPreferenceResponse

func (response GetCashbunnyUserPreference200JSONResponse) VisitGetCashbunnyUserPreferenceResponse(w http.ResponseWriter) error

type GetCashbunnyUserPreference404Response

type GetCashbunnyUserPreference404Response struct {
}

func (GetCashbunnyUserPreference404Response) VisitGetCashbunnyUserPreferenceResponse

func (response GetCashbunnyUserPreference404Response) VisitGetCashbunnyUserPreferenceResponse(w http.ResponseWriter) error

type GetCashbunnyUserPreferenceRequestObject

type GetCashbunnyUserPreferenceRequestObject struct {
}

type GetCashbunnyUserPreferenceResponseObject

type GetCashbunnyUserPreferenceResponseObject interface {
	VisitGetCashbunnyUserPreferenceResponse(w http.ResponseWriter) error
}

type GetUser200JSONResponse

type GetUser200JSONResponse struct {
	User User `json:"user"`
}

func (GetUser200JSONResponse) VisitGetUserResponse

func (response GetUser200JSONResponse) VisitGetUserResponse(w http.ResponseWriter) error

type GetUserRequestObject

type GetUserRequestObject struct {
}

type GetUserResponseObject

type GetUserResponseObject interface {
	VisitGetUserResponse(w http.ResponseWriter) error
}

type GetUserSystemPreference200JSONResponse

type GetUserSystemPreference200JSONResponse struct {
	// UserSystemPreference Model defining user system preferences such as language, time zone etc.
	UserSystemPreference UserSystemPreference `json:"user_system_preference"`
}

func (GetUserSystemPreference200JSONResponse) VisitGetUserSystemPreferenceResponse

func (response GetUserSystemPreference200JSONResponse) VisitGetUserSystemPreferenceResponse(w http.ResponseWriter) error

type GetUserSystemPreference404Response

type GetUserSystemPreference404Response struct {
}

func (GetUserSystemPreference404Response) VisitGetUserSystemPreferenceResponse

func (response GetUserSystemPreference404Response) VisitGetUserSystemPreferenceResponse(w http.ResponseWriter) error

type GetUserSystemPreferenceRequestObject

type GetUserSystemPreferenceRequestObject struct {
}

type GetUserSystemPreferenceResponseObject

type GetUserSystemPreferenceResponseObject interface {
	VisitGetUserSystemPreferenceResponse(w http.ResponseWriter) error
}

type Ping200JSONResponse

type Ping200JSONResponse struct {
	// Message Pong!
	Message string `json:"message"`
}

func (Ping200JSONResponse) VisitPingResponse

func (response Ping200JSONResponse) VisitPingResponse(w http.ResponseWriter) error

type PingRequestObject

type PingRequestObject struct {
}

type PingResponseObject

type PingResponseObject interface {
	VisitPingResponse(w http.ResponseWriter) error
}

type RefreshJWTToken200Response

type RefreshJWTToken200Response struct {
	Headers RefreshJWTToken200ResponseHeaders
}

func (RefreshJWTToken200Response) VisitRefreshJWTTokenResponse

func (response RefreshJWTToken200Response) VisitRefreshJWTTokenResponse(w http.ResponseWriter) error

type RefreshJWTToken200ResponseHeaders

type RefreshJWTToken200ResponseHeaders struct {
	SetCookie string
}

type RefreshJWTTokenRequestObject

type RefreshJWTTokenRequestObject struct {
}

type RefreshJWTTokenResponseObject

type RefreshJWTTokenResponseObject interface {
	VisitRefreshJWTTokenResponse(w http.ResponseWriter) error
}

type Repeat200JSONResponse

type Repeat200JSONResponse struct {
	// Message The message you sent
	Message string `json:"message"`
}

func (Repeat200JSONResponse) VisitRepeatResponse

func (response Repeat200JSONResponse) VisitRepeatResponse(w http.ResponseWriter) error

type RepeatJSONBody

type RepeatJSONBody struct {
	// Message Some message you want to be sent back
	Message string `json:"message"`
}

RepeatJSONBody defines parameters for Repeat.

type RepeatJSONRequestBody

type RepeatJSONRequestBody RepeatJSONBody

RepeatJSONRequestBody defines body for Repeat for application/json ContentType.

type RepeatRequestObject

type RepeatRequestObject struct {
	Body *RepeatJSONRequestBody
}

type RepeatResponseObject

type RepeatResponseObject interface {
	VisitRepeatResponse(w http.ResponseWriter) error
}

type ServerInterface

type ServerInterface interface {

	// (POST /api/v1/auth)
	CreateUser(ctx echo.Context) error

	// (POST /api/v1/auth/token)
	CreateJWTToken(ctx echo.Context) error

	// (PUT /api/v1/auth/token)
	RefreshJWTToken(ctx echo.Context) error

	// (GET /api/v1/ping)
	Ping(ctx echo.Context) error

	// (POST /api/v1/repeat)
	Repeat(ctx echo.Context) error

	// (DELETE /api/v1/secure/auth/refresh-token)
	DeleteJWTRefreshToken(ctx echo.Context) error

	// (POST /api/v1/secure/auth/refresh-token)
	CreateJWTRefreshToken(ctx echo.Context) error

	// (DELETE /api/v1/secure/auth/token)
	DeleteJWTToken(ctx echo.Context) error

	// (GET /api/v1/secure/cashbunny/accounts)
	GetCashbunnyAccounts(ctx echo.Context) error

	// (POST /api/v1/secure/cashbunny/accounts)
	CreateCashbunnyAccount(ctx echo.Context) error

	// (DELETE /api/v1/secure/cashbunny/accounts/{accountId})
	DeleteCashbunnyAccount(ctx echo.Context, accountId uint32) error

	// (PUT /api/v1/secure/cashbunny/accounts/{accountId})
	UpdateCashbunnyAccount(ctx echo.Context, accountId uint32) error

	// (GET /api/v1/secure/cashbunny/currencies)
	GetCashbunnySupportedCurrencies(ctx echo.Context) error

	// (GET /api/v1/secure/cashbunny/overview)
	GetCashbunnyOverview(ctx echo.Context, params GetCashbunnyOverviewParams) error

	// (GET /api/v1/secure/cashbunny/transactions)
	GetCashbunnyTransactions(ctx echo.Context) error

	// (POST /api/v1/secure/cashbunny/transactions)
	CreateCashbunnyTransaction(ctx echo.Context) error

	// (DELETE /api/v1/secure/cashbunny/transactions/{transactionId})
	DeleteCashbunnyTransaction(ctx echo.Context, transactionId uint32) error

	// (PUT /api/v1/secure/cashbunny/transactions/{transactionId})
	UpdateCashbunnyTransaction(ctx echo.Context, transactionId uint32) error

	// (GET /api/v1/secure/cashbunny/user-preferences)
	GetCashbunnyUserPreference(ctx echo.Context) error

	// (POST /api/v1/secure/cashbunny/user-preferences)
	CreateCashbunnyDefaultUserPreference(ctx echo.Context) error

	// (GET /api/v1/secure/system-preferences)
	GetUserSystemPreference(ctx echo.Context) error

	// (POST /api/v1/secure/system-preferences)
	CreateDefaultUserSystemPreference(ctx echo.Context) error

	// (PUT /api/v1/secure/system-preferences)
	UpdateUserSystemPreference(ctx echo.Context) error

	// (GET /api/v1/secure/user)
	GetUser(ctx echo.Context) error
}

ServerInterface represents all server handlers.

func NewStrictHandler

func NewStrictHandler(ssi StrictServerInterface, middlewares []StrictMiddlewareFunc) ServerInterface

type ServerInterfaceWrapper

type ServerInterfaceWrapper struct {
	Handler ServerInterface
}

ServerInterfaceWrapper converts echo contexts to parameters.

func (*ServerInterfaceWrapper) CreateCashbunnyAccount

func (w *ServerInterfaceWrapper) CreateCashbunnyAccount(ctx echo.Context) error

CreateCashbunnyAccount converts echo context to params.

func (*ServerInterfaceWrapper) CreateCashbunnyDefaultUserPreference

func (w *ServerInterfaceWrapper) CreateCashbunnyDefaultUserPreference(ctx echo.Context) error

CreateCashbunnyDefaultUserPreference converts echo context to params.

func (*ServerInterfaceWrapper) CreateCashbunnyTransaction

func (w *ServerInterfaceWrapper) CreateCashbunnyTransaction(ctx echo.Context) error

CreateCashbunnyTransaction converts echo context to params.

func (*ServerInterfaceWrapper) CreateDefaultUserSystemPreference

func (w *ServerInterfaceWrapper) CreateDefaultUserSystemPreference(ctx echo.Context) error

CreateDefaultUserSystemPreference converts echo context to params.

func (*ServerInterfaceWrapper) CreateJWTRefreshToken

func (w *ServerInterfaceWrapper) CreateJWTRefreshToken(ctx echo.Context) error

CreateJWTRefreshToken converts echo context to params.

func (*ServerInterfaceWrapper) CreateJWTToken

func (w *ServerInterfaceWrapper) CreateJWTToken(ctx echo.Context) error

CreateJWTToken converts echo context to params.

func (*ServerInterfaceWrapper) CreateUser

func (w *ServerInterfaceWrapper) CreateUser(ctx echo.Context) error

CreateUser converts echo context to params.

func (*ServerInterfaceWrapper) DeleteCashbunnyAccount

func (w *ServerInterfaceWrapper) DeleteCashbunnyAccount(ctx echo.Context) error

DeleteCashbunnyAccount converts echo context to params.

func (*ServerInterfaceWrapper) DeleteCashbunnyTransaction

func (w *ServerInterfaceWrapper) DeleteCashbunnyTransaction(ctx echo.Context) error

DeleteCashbunnyTransaction converts echo context to params.

func (*ServerInterfaceWrapper) DeleteJWTRefreshToken

func (w *ServerInterfaceWrapper) DeleteJWTRefreshToken(ctx echo.Context) error

DeleteJWTRefreshToken converts echo context to params.

func (*ServerInterfaceWrapper) DeleteJWTToken

func (w *ServerInterfaceWrapper) DeleteJWTToken(ctx echo.Context) error

DeleteJWTToken converts echo context to params.

func (*ServerInterfaceWrapper) GetCashbunnyAccounts

func (w *ServerInterfaceWrapper) GetCashbunnyAccounts(ctx echo.Context) error

GetCashbunnyAccounts converts echo context to params.

func (*ServerInterfaceWrapper) GetCashbunnyOverview

func (w *ServerInterfaceWrapper) GetCashbunnyOverview(ctx echo.Context) error

GetCashbunnyOverview converts echo context to params.

func (*ServerInterfaceWrapper) GetCashbunnySupportedCurrencies

func (w *ServerInterfaceWrapper) GetCashbunnySupportedCurrencies(ctx echo.Context) error

GetCashbunnySupportedCurrencies converts echo context to params.

func (*ServerInterfaceWrapper) GetCashbunnyTransactions

func (w *ServerInterfaceWrapper) GetCashbunnyTransactions(ctx echo.Context) error

GetCashbunnyTransactions converts echo context to params.

func (*ServerInterfaceWrapper) GetCashbunnyUserPreference

func (w *ServerInterfaceWrapper) GetCashbunnyUserPreference(ctx echo.Context) error

GetCashbunnyUserPreference converts echo context to params.

func (*ServerInterfaceWrapper) GetUser

func (w *ServerInterfaceWrapper) GetUser(ctx echo.Context) error

GetUser converts echo context to params.

func (*ServerInterfaceWrapper) GetUserSystemPreference

func (w *ServerInterfaceWrapper) GetUserSystemPreference(ctx echo.Context) error

GetUserSystemPreference converts echo context to params.

func (*ServerInterfaceWrapper) Ping

Ping converts echo context to params.

func (*ServerInterfaceWrapper) RefreshJWTToken

func (w *ServerInterfaceWrapper) RefreshJWTToken(ctx echo.Context) error

RefreshJWTToken converts echo context to params.

func (*ServerInterfaceWrapper) Repeat

func (w *ServerInterfaceWrapper) Repeat(ctx echo.Context) error

Repeat converts echo context to params.

func (*ServerInterfaceWrapper) UpdateCashbunnyAccount

func (w *ServerInterfaceWrapper) UpdateCashbunnyAccount(ctx echo.Context) error

UpdateCashbunnyAccount converts echo context to params.

func (*ServerInterfaceWrapper) UpdateCashbunnyTransaction

func (w *ServerInterfaceWrapper) UpdateCashbunnyTransaction(ctx echo.Context) error

UpdateCashbunnyTransaction converts echo context to params.

func (*ServerInterfaceWrapper) UpdateUserSystemPreference

func (w *ServerInterfaceWrapper) UpdateUserSystemPreference(ctx echo.Context) error

UpdateUserSystemPreference converts echo context to params.

type StrictHandlerFunc

type StrictHandlerFunc = strictecho.StrictEchoHandlerFunc

type StrictMiddlewareFunc

type StrictMiddlewareFunc = strictecho.StrictEchoMiddlewareFunc

type StrictServerInterface

type StrictServerInterface interface {

	// (POST /api/v1/auth)
	CreateUser(ctx context.Context, request CreateUserRequestObject) (CreateUserResponseObject, error)

	// (POST /api/v1/auth/token)
	CreateJWTToken(ctx context.Context, request CreateJWTTokenRequestObject) (CreateJWTTokenResponseObject, error)

	// (PUT /api/v1/auth/token)
	RefreshJWTToken(ctx context.Context, request RefreshJWTTokenRequestObject) (RefreshJWTTokenResponseObject, error)

	// (GET /api/v1/ping)
	Ping(ctx context.Context, request PingRequestObject) (PingResponseObject, error)

	// (POST /api/v1/repeat)
	Repeat(ctx context.Context, request RepeatRequestObject) (RepeatResponseObject, error)

	// (DELETE /api/v1/secure/auth/refresh-token)
	DeleteJWTRefreshToken(ctx context.Context, request DeleteJWTRefreshTokenRequestObject) (DeleteJWTRefreshTokenResponseObject, error)

	// (POST /api/v1/secure/auth/refresh-token)
	CreateJWTRefreshToken(ctx context.Context, request CreateJWTRefreshTokenRequestObject) (CreateJWTRefreshTokenResponseObject, error)

	// (DELETE /api/v1/secure/auth/token)
	DeleteJWTToken(ctx context.Context, request DeleteJWTTokenRequestObject) (DeleteJWTTokenResponseObject, error)

	// (GET /api/v1/secure/cashbunny/accounts)
	GetCashbunnyAccounts(ctx context.Context, request GetCashbunnyAccountsRequestObject) (GetCashbunnyAccountsResponseObject, error)

	// (POST /api/v1/secure/cashbunny/accounts)
	CreateCashbunnyAccount(ctx context.Context, request CreateCashbunnyAccountRequestObject) (CreateCashbunnyAccountResponseObject, error)

	// (DELETE /api/v1/secure/cashbunny/accounts/{accountId})
	DeleteCashbunnyAccount(ctx context.Context, request DeleteCashbunnyAccountRequestObject) (DeleteCashbunnyAccountResponseObject, error)

	// (PUT /api/v1/secure/cashbunny/accounts/{accountId})
	UpdateCashbunnyAccount(ctx context.Context, request UpdateCashbunnyAccountRequestObject) (UpdateCashbunnyAccountResponseObject, error)

	// (GET /api/v1/secure/cashbunny/currencies)
	GetCashbunnySupportedCurrencies(ctx context.Context, request GetCashbunnySupportedCurrenciesRequestObject) (GetCashbunnySupportedCurrenciesResponseObject, error)

	// (GET /api/v1/secure/cashbunny/overview)
	GetCashbunnyOverview(ctx context.Context, request GetCashbunnyOverviewRequestObject) (GetCashbunnyOverviewResponseObject, error)

	// (GET /api/v1/secure/cashbunny/transactions)
	GetCashbunnyTransactions(ctx context.Context, request GetCashbunnyTransactionsRequestObject) (GetCashbunnyTransactionsResponseObject, error)

	// (POST /api/v1/secure/cashbunny/transactions)
	CreateCashbunnyTransaction(ctx context.Context, request CreateCashbunnyTransactionRequestObject) (CreateCashbunnyTransactionResponseObject, error)

	// (DELETE /api/v1/secure/cashbunny/transactions/{transactionId})
	DeleteCashbunnyTransaction(ctx context.Context, request DeleteCashbunnyTransactionRequestObject) (DeleteCashbunnyTransactionResponseObject, error)

	// (PUT /api/v1/secure/cashbunny/transactions/{transactionId})
	UpdateCashbunnyTransaction(ctx context.Context, request UpdateCashbunnyTransactionRequestObject) (UpdateCashbunnyTransactionResponseObject, error)

	// (GET /api/v1/secure/cashbunny/user-preferences)
	GetCashbunnyUserPreference(ctx context.Context, request GetCashbunnyUserPreferenceRequestObject) (GetCashbunnyUserPreferenceResponseObject, error)

	// (POST /api/v1/secure/cashbunny/user-preferences)
	CreateCashbunnyDefaultUserPreference(ctx context.Context, request CreateCashbunnyDefaultUserPreferenceRequestObject) (CreateCashbunnyDefaultUserPreferenceResponseObject, error)

	// (GET /api/v1/secure/system-preferences)
	GetUserSystemPreference(ctx context.Context, request GetUserSystemPreferenceRequestObject) (GetUserSystemPreferenceResponseObject, error)

	// (POST /api/v1/secure/system-preferences)
	CreateDefaultUserSystemPreference(ctx context.Context, request CreateDefaultUserSystemPreferenceRequestObject) (CreateDefaultUserSystemPreferenceResponseObject, error)

	// (PUT /api/v1/secure/system-preferences)
	UpdateUserSystemPreference(ctx context.Context, request UpdateUserSystemPreferenceRequestObject) (UpdateUserSystemPreferenceResponseObject, error)

	// (GET /api/v1/secure/user)
	GetUser(ctx context.Context, request GetUserRequestObject) (GetUserResponseObject, error)
}

StrictServerInterface represents all server handlers.

type UpdateCashbunnyAccount200Response

type UpdateCashbunnyAccount200Response struct {
}

func (UpdateCashbunnyAccount200Response) VisitUpdateCashbunnyAccountResponse

func (response UpdateCashbunnyAccount200Response) VisitUpdateCashbunnyAccountResponse(w http.ResponseWriter) error

type UpdateCashbunnyAccount400JSONResponse

type UpdateCashbunnyAccount400JSONResponse Error

func (UpdateCashbunnyAccount400JSONResponse) VisitUpdateCashbunnyAccountResponse

func (response UpdateCashbunnyAccount400JSONResponse) VisitUpdateCashbunnyAccountResponse(w http.ResponseWriter) error

type UpdateCashbunnyAccountJSONBody

type UpdateCashbunnyAccountJSONBody struct {
	Description string `json:"description" validate:"required,max=200"`

	// Name Name of the account to save
	Name string `json:"name" validate:"required,max=100"`

	// OrderIndex Order of the record to be placed in
	OrderIndex uint32 `json:"order_index" validate:"required,number"`
}

UpdateCashbunnyAccountJSONBody defines parameters for UpdateCashbunnyAccount.

type UpdateCashbunnyAccountJSONRequestBody

type UpdateCashbunnyAccountJSONRequestBody UpdateCashbunnyAccountJSONBody

UpdateCashbunnyAccountJSONRequestBody defines body for UpdateCashbunnyAccount for application/json ContentType.

type UpdateCashbunnyAccountRequestObject

type UpdateCashbunnyAccountRequestObject struct {
	AccountId uint32 `json:"accountId"`
	Body      *UpdateCashbunnyAccountJSONRequestBody
}

type UpdateCashbunnyAccountResponseObject

type UpdateCashbunnyAccountResponseObject interface {
	VisitUpdateCashbunnyAccountResponse(w http.ResponseWriter) error
}

type UpdateCashbunnyTransaction200Response

type UpdateCashbunnyTransaction200Response struct {
}

func (UpdateCashbunnyTransaction200Response) VisitUpdateCashbunnyTransactionResponse

func (response UpdateCashbunnyTransaction200Response) VisitUpdateCashbunnyTransactionResponse(w http.ResponseWriter) error

type UpdateCashbunnyTransaction400JSONResponse

type UpdateCashbunnyTransaction400JSONResponse Error

func (UpdateCashbunnyTransaction400JSONResponse) VisitUpdateCashbunnyTransactionResponse

func (response UpdateCashbunnyTransaction400JSONResponse) VisitUpdateCashbunnyTransactionResponse(w http.ResponseWriter) error

type UpdateCashbunnyTransactionJSONBody

type UpdateCashbunnyTransactionJSONBody struct {
	Amount      float64 `json:"amount" validate:"required,min=0"`
	Description string  `json:"description" validate:"required,max=100"`

	// TransactedAt ISO8601 compatible time string for transaction datetime
	TransactedAt string `json:"transacted_at" validate:"required,_iso8601"`
}

UpdateCashbunnyTransactionJSONBody defines parameters for UpdateCashbunnyTransaction.

type UpdateCashbunnyTransactionJSONRequestBody

type UpdateCashbunnyTransactionJSONRequestBody UpdateCashbunnyTransactionJSONBody

UpdateCashbunnyTransactionJSONRequestBody defines body for UpdateCashbunnyTransaction for application/json ContentType.

type UpdateCashbunnyTransactionRequestObject

type UpdateCashbunnyTransactionRequestObject struct {
	TransactionId uint32 `json:"transactionId"`
	Body          *UpdateCashbunnyTransactionJSONRequestBody
}

type UpdateCashbunnyTransactionResponseObject

type UpdateCashbunnyTransactionResponseObject interface {
	VisitUpdateCashbunnyTransactionResponse(w http.ResponseWriter) error
}

type UpdateUserSystemPreference200JSONResponse

type UpdateUserSystemPreference200JSONResponse struct {
	// UserSystemPreference Model defining user system preferences such as language, time zone etc.
	UserSystemPreference UserSystemPreference `json:"user_system_preference"`
}

func (UpdateUserSystemPreference200JSONResponse) VisitUpdateUserSystemPreferenceResponse

func (response UpdateUserSystemPreference200JSONResponse) VisitUpdateUserSystemPreferenceResponse(w http.ResponseWriter) error

type UpdateUserSystemPreferenceJSONRequestBody

type UpdateUserSystemPreferenceJSONRequestBody = UserSystemPreference

UpdateUserSystemPreferenceJSONRequestBody defines body for UpdateUserSystemPreference for application/json ContentType.

type UpdateUserSystemPreferenceRequestObject

type UpdateUserSystemPreferenceRequestObject struct {
	Body *UpdateUserSystemPreferenceJSONRequestBody
}

type UpdateUserSystemPreferenceResponseObject

type UpdateUserSystemPreferenceResponseObject interface {
	VisitUpdateUserSystemPreferenceResponse(w http.ResponseWriter) error
}

type User

type User struct {
	CreatedAt  string `json:"created_at"`
	Id         uint32 `json:"id"`
	LoggedInAt string `json:"logged_in_at"`
	Name       string `json:"name"`
}

User defines model for user.

type UserSystemPreference

type UserSystemPreference struct {
	Language *string `json:"language"`
}

UserSystemPreference Model defining user system preferences such as language, time zone etc.

Jump to

Keyboard shortcuts

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