package
0.0.0-20241130141320-2c3d085598af
Repository: https://github.com/ya-breeze/geekbudgetbe.git
Documentation: pkg.go.dev

# README

Go API client for goclient

No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)

Overview

This API client was generated by the OpenAPI Generator project. By using the OpenAPI-spec from a remote server, you can easily generate an API client.

  • API version: 0.0.1
  • Package version: 1.0.0
  • Generator version: 7.10.0-SNAPSHOT
  • Build package: org.openapitools.codegen.languages.GoClientCodegen

Installation

Install the following dependencies:

go get github.com/stretchr/testify/assert
go get golang.org/x/net/context

Put the package under your project folder and add the following in import:

import goclient "github.com/GIT_USER_ID/GIT_REPO_ID"

To use a proxy, set the environment variable HTTP_PROXY:

os.Setenv("HTTP_PROXY", "http://proxy_name:proxy_port")

Configuration of Server URL

Default configuration comes with Servers field that contains server objects as defined in the OpenAPI specification.

Select Server Configuration

For using other server than the one defined on index 0 set context value goclient.ContextServerIndex of type int.

ctx := context.WithValue(context.Background(), goclient.ContextServerIndex, 1)

Templated Server URL

Templated server URL is formatted using default variables from configuration or from context value goclient.ContextServerVariables of type map[string]string.

ctx := context.WithValue(context.Background(), goclient.ContextServerVariables, map[string]string{
	"basePath": "v2",
})

Note, enum values are always validated and all unused variables are silently ignored.

URLs Configuration per Operation

Each operation can use different server URL defined using OperationServers map in the Configuration. An operation is uniquely identified by "{classname}Service.{nickname}" string. Similar rules for overriding default operation server index and variables applies by using goclient.ContextOperationServerIndices and goclient.ContextOperationServerVariables context maps.

ctx := context.WithValue(context.Background(), goclient.ContextOperationServerIndices, map[string]int{
	"{classname}Service.{nickname}": 2,
})
ctx = context.WithValue(context.Background(), goclient.ContextOperationServerVariables, map[string]map[string]string{
	"{classname}Service.{nickname}": {
		"port": "8443",
	},
})

Documentation for API Endpoints

All URIs are relative to http://localhost

ClassMethodHTTP requestDescription
AccountsAPICreateAccountPost /v1/accountscreate new account
AccountsAPIDeleteAccountDelete /v1/accounts/{id}delete account
AccountsAPIGetAccountGet /v1/accounts/{id}get account
AccountsAPIGetAccountHistoryGet /v1/accounts/{accountId}/historyreturn list of dates when this account was used in some transaction
AccountsAPIGetAccountsGet /v1/accountsget all accounts
AccountsAPIUpdateAccountPut /v1/accounts/{id}update account
AggregationsAPIGetBalancesGet /v1/balancesget balance for filtered transactions
AggregationsAPIGetExpensesGet /v1/expensesget expenses for filtered transactions
AggregationsAPIGetIncomesGet /v1/incomesget incomes for filtered transactions
AuthAPIAuthorizePost /v1/authorizevalidate user/password and return token
BankImportersAPICreateBankImporterPost /v1/bankImporterscreate new bank importer
BankImportersAPIDeleteBankImporterDelete /v1/bankImporters/{id}delete bank importer
BankImportersAPIFetchBankImporterPost /v1/bankImporters/{id}/fetchfetch new transactions from bank
BankImportersAPIGetBankImportersGet /v1/bankImportersget all bank importers
BankImportersAPIUpdateBankImporterPut /v1/bankImporters/{id}update bank importer
BankImportersAPIUploadBankImporterPost /v1/bankImporters/{id}/uploadUpload new transactions from bank
CurrenciesAPICreateCurrencyPost /v1/currenciescreate new currency
CurrenciesAPIDeleteCurrencyDelete /v1/currencies/{id}delete currency
CurrenciesAPIGetCurrenciesGet /v1/currenciesget all currencies
CurrenciesAPIUpdateCurrencyPut /v1/currencies/{id}update currency
ExportAPIExportPost /v1/exportDownload full user's data
ImportAPICallImportPost /v1/importUpload and import full user's data
MatchersAPICheckMatcherPost /v1/matchers/checkcheck if passed matcher matches given transaction
MatchersAPICreateMatcherPost /v1/matcherscreate new matcher
MatchersAPIDeleteMatcherDelete /v1/matchers/{id}delete matcher
MatchersAPIGetMatchersGet /v1/matchersget all matchers
MatchersAPIUpdateMatcherPut /v1/matchers/{id}update matcher
NotificationsAPIDeleteNotificationDelete /v1/notifications/{id}delete notification
NotificationsAPIGetNotificationsGet /v1/notificationsreturn all notifications
TransactionsAPICreateTransactionPost /v1/transactionscreate new transaction
TransactionsAPIDeleteTransactionDelete /v1/transactions/{id}delete transaction
TransactionsAPIGetTransactionGet /v1/transactions/{id}get transaction
TransactionsAPIGetTransactionsGet /v1/transactionsget all transactions which matches given filters
TransactionsAPIUpdateTransactionPut /v1/transactions/{id}update transaction
UnprocessedTransactionsAPIConvertUnprocessedTransactionPost /v1/unprocessedTransactions/{id}/convertconvert unprocessed transactions into normal transaction
UnprocessedTransactionsAPIDeleteUnprocessedTransactionDelete /v1/unprocessedTransactions/{id}delete unprocessed transaction
UnprocessedTransactionsAPIGetUnprocessedTransactionsGet /v1/unprocessedTransactionsget all unprocessed transactions
UserAPIGetUserGet /v1/userreturn user object

Documentation For Models

Documentation For Authorization

Authentication schemes defined for the API:

BearerAuth

  • Type: HTTP Bearer token authentication

Example

auth := context.WithValue(context.Background(), goclient.ContextAccessToken, "BEARER_TOKEN_STRING")
r, err := client.Service.Operation(auth, args)

Documentation for Utility Methods

Due to the fact that model structure members are all pointers, this package contains a number of utility functions to easily obtain pointers to values of basic types. Each of these functions takes a value of the given basic type and returns a pointer to it:

  • PtrBool
  • PtrInt
  • PtrInt32
  • PtrInt64
  • PtrFloat
  • PtrFloat32
  • PtrFloat64
  • PtrString
  • PtrTime

Author

[email protected]