vectali

package module
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2026 License: Apache-2.0 Imports: 21 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

Vectali Go SDK

Official Go client for converting raster artwork to clean SVG, PDF, EPS, and DXF vectors. Requires Go 1.23+.

Documentation · Code Examples · API Keys · Pricing · API Reference

Install

go get github.com/vectali/vectali-go@v0.3.1

Every Vectali account includes 3 free hosted API trial conversions so you can test end-to-end before choosing a plan.

Quickstart

package main

import (
	"context"
	"os"

	vectali "github.com/vectali/vectali-go"
)

func convertLogo(ctx context.Context) ([]byte, error) {
	client := vectali.NewClient(os.Getenv("VECTALI_API_KEY"))
	result, err := client.Convert(ctx, "logo.png")
	if err != nil {
		return nil, err
	}
	return client.Download(ctx, result.ConversionId, "pdf")
}

Key Methods

  • client.Convert(ctx, input, opts...) accepts a file path, []byte, or io.Reader (with optional ConvertOptions{Filename, IdempotencyKey}). Readers remain open.
  • client.Download(ctx, conversionID, format) returns raw []byte in memory ("svg", "pdf", "eps", "dxf"). Temporary files are never leaked to callers.
  • client.GetAllowance(ctx) and client.Health(ctx) inspect account credits and public API health.
  • Configure vectali.WithBaseURL(...) and vectali.WithTimeout(...) on NewClient. Failures return ResponseError with the HTTP response preserved.

Limits & Billing

Limit Value
Input formats PNG, JPG, GIF, BMP, WebP
Output formats SVG, PDF, EPS, DXF
Max file size 10 MiB
Max resolution 4,000,000 pixels (4096 px max per side)
Billing 3 free hosted trial conversions included; 1 credit per successful conversion, downloads are free
  • Idempotent retries: Every conversion accepts an Idempotency-Key (auto-generated UUID v4 if omitted). Reuse the same key and image bytes after an uncertain network error to avoid double-charging.
  • No automatic retries: Failed requests raise a structured error with HTTP status, X-Vectali-Request-Id, and Retry-After.
  • Server-side only: Keep VECTALI_API_KEY in server environment variables, never in browser code, prompts, or Git.
  • Safe transport defaults: 260-second timeout, redirects disabled, and cookies ignored.

Apache-2.0 · Source & tests in vectali/api-tooling (v0.3.1).

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	JsonCheck = regexp.MustCompile(`(?i:(?:application|text)/(?:[^;]+\+)?json)`)
	XmlCheck  = regexp.MustCompile(`(?i:(?:application|text)/(?:[^;]+\+)?xml)`)
)
View Source
var (
	// ContextAccessToken takes a string oauth2 access token as authentication for the request.
	ContextAccessToken = contextKey("accesstoken")

	// ContextServerIndex uses a server configuration from the index.
	ContextServerIndex = contextKey("serverIndex")

	// ContextOperationServerIndices uses a server configuration from the index mapping.
	ContextOperationServerIndices = contextKey("serverOperationIndices")

	// ContextServerVariables overrides a server configuration variables.
	ContextServerVariables = contextKey("serverVariables")

	// ContextOperationServerVariables overrides a server configuration variables using operation specific values.
	ContextOperationServerVariables = contextKey("serverOperationVariables")
)

Functions

func CacheExpires

func CacheExpires(r *http.Response) time.Time

CacheExpires helper function to determine remaining time before repeating a request.

func IsNil

func IsNil(i interface{}) bool

IsNil checks if an input is nil

func PtrBool

func PtrBool(v bool) *bool

PtrBool is a helper routine that returns a pointer to given boolean value.

func PtrFloat32

func PtrFloat32(v float32) *float32

PtrFloat32 is a helper routine that returns a pointer to given float value.

func PtrFloat64

func PtrFloat64(v float64) *float64

PtrFloat64 is a helper routine that returns a pointer to given float value.

func PtrInt

func PtrInt(v int) *int

PtrInt is a helper routine that returns a pointer to given integer value.

func PtrInt32

func PtrInt32(v int32) *int32

PtrInt32 is a helper routine that returns a pointer to given integer value.

func PtrInt64

func PtrInt64(v int64) *int64

PtrInt64 is a helper routine that returns a pointer to given integer value.

func PtrString

func PtrString(v string) *string

PtrString is a helper routine that returns a pointer to given string value.

func PtrTime

func PtrTime(v time.Time) *time.Time

PtrTime is helper routine that returns a pointer to given Time value.

Types

type APIClient

type APIClient struct {
	DefaultAPI *DefaultAPIService
	// contains filtered or unexported fields
}

APIClient manages communication with the Vectali API API v1.0.0 In most cases there should be only one, shared, APIClient.

func NewAPIClient

func NewAPIClient(cfg *Configuration) *APIClient

NewAPIClient creates a new API client. Requires a userAgent string describing your application. optionally a custom http.Client to allow for advanced features such as caching.

When no http.Client is supplied, the client follows redirects like http.DefaultClient does, but a redirect that leaves the origin (scheme, host and port) of the original request is followed without the client's credentials: the API keys of this API, Authorization, Cookie and the configured DefaultHeader values are removed from the redirected request, as is the Referer naming the previous URL. Supply an http.Client with its own CheckRedirect to use another policy.

func (*APIClient) GetConfig

func (c *APIClient) GetConfig() *Configuration

Allow modification of underlying config for alternate implementations and testing Caution: modifying the configuration while live can cause data races and potentially unwanted behavior

type APIKey

type APIKey struct {
	Key    string
	Prefix string
}

APIKey provides API key based authentication to a request passed via context using ContextAPIKey

type APIResponse

type APIResponse struct {
	*http.Response `json:"-"`
	Message        string `json:"message,omitempty"`
	// Operation is the name of the OpenAPI operation.
	Operation string `json:"operation,omitempty"`
	// RequestURL is the request URL. This value is always available, even if the
	// embedded *http.Response is nil.
	RequestURL string `json:"url,omitempty"`
	// Method is the HTTP method used for the request.  This value is always
	// available, even if the embedded *http.Response is nil.
	Method string `json:"method,omitempty"`
	// Payload holds the contents of the response body (which may be nil or empty).
	// This is provided here as the raw response.Body() reader will have already
	// been drained.
	Payload []byte `json:"-"`
}

APIResponse stores the API response returned by the server.

func NewAPIResponse

func NewAPIResponse(r *http.Response) *APIResponse

NewAPIResponse returns a new APIResponse object.

func NewAPIResponseWithError

func NewAPIResponseWithError(errorMessage string) *APIResponse

NewAPIResponseWithError returns a new APIResponse object with the provided error message.

type ApiConvertImageRequest

type ApiConvertImageRequest struct {
	ApiService *DefaultAPIService
	// contains filtered or unexported fields
}

func (ApiConvertImageRequest) Execute

func (ApiConvertImageRequest) IdempotencyKey

func (r ApiConvertImageRequest) IdempotencyKey(idempotencyKey string) ApiConvertImageRequest

Recommended: reuse the same key with identical image bytes when retrying. Different bytes with a completed key return 409 idempotency_conflict. Omission creates a fresh key per call.

func (ApiConvertImageRequest) Image

PNG, JPG, GIF, BMP or WebP, up to 10485760 bytes and 4000000 pixels (4096 per side).

type ApiGetAllowanceRequest

type ApiGetAllowanceRequest struct {
	ApiService *DefaultAPIService
	// contains filtered or unexported fields
}

func (ApiGetAllowanceRequest) Execute

type ApiGetVectorRequest

type ApiGetVectorRequest struct {
	ApiService *DefaultAPIService
	// contains filtered or unexported fields
}

func (ApiGetVectorRequest) Execute

func (r ApiGetVectorRequest) Execute() (*os.File, *http.Response, error)

type ApiHealthRequest

type ApiHealthRequest struct {
	ApiService *DefaultAPIService
	// contains filtered or unexported fields
}

func (ApiHealthRequest) Execute

type BasicAuth

type BasicAuth struct {
	UserName string `json:"userName,omitempty"`
	Password string `json:"password,omitempty"`
}

BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth

type BillingSummary

type BillingSummary struct {
	Mode                    string                    `json:"mode"`
	AvailablePlans          []string                  `json:"availablePlans,omitempty"`
	FreeExports             BillingSummaryFreeExports `json:"freeExports"`
	FreeApiConversions      BillingSummaryFreeExports `json:"freeApiConversions"`
	WebCredits              BillingSummaryWebCredits  `json:"webCredits"`
	ApiCredits              BillingSummaryApiCredits  `json:"apiCredits"`
	WebPro                  BillingSummaryWebPro      `json:"webPro"`
	ApiStarter              BillingSummaryApiStarter  `json:"apiStarter"`
	CustomerPortalAvailable bool                      `json:"customerPortalAvailable"`
	AdditionalProperties    map[string]interface{}
}

BillingSummary struct for BillingSummary

func NewBillingSummary

func NewBillingSummary(mode string, freeExports BillingSummaryFreeExports, freeApiConversions BillingSummaryFreeExports, webCredits BillingSummaryWebCredits, apiCredits BillingSummaryApiCredits, webPro BillingSummaryWebPro, apiStarter BillingSummaryApiStarter, customerPortalAvailable bool) *BillingSummary

NewBillingSummary instantiates a new BillingSummary object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed

func NewBillingSummaryWithDefaults

func NewBillingSummaryWithDefaults() *BillingSummary

NewBillingSummaryWithDefaults instantiates a new BillingSummary object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set

func (*BillingSummary) GetApiCredits

func (o *BillingSummary) GetApiCredits() BillingSummaryApiCredits

GetApiCredits returns the ApiCredits field value

func (*BillingSummary) GetApiCreditsOk

func (o *BillingSummary) GetApiCreditsOk() (*BillingSummaryApiCredits, bool)

GetApiCreditsOk returns a tuple with the ApiCredits field value and a boolean to check if the value has been set.

func (*BillingSummary) GetApiStarter

func (o *BillingSummary) GetApiStarter() BillingSummaryApiStarter

GetApiStarter returns the ApiStarter field value

func (*BillingSummary) GetApiStarterOk

func (o *BillingSummary) GetApiStarterOk() (*BillingSummaryApiStarter, bool)

GetApiStarterOk returns a tuple with the ApiStarter field value and a boolean to check if the value has been set.

func (*BillingSummary) GetAvailablePlans

func (o *BillingSummary) GetAvailablePlans() []string

GetAvailablePlans returns the AvailablePlans field value if set, zero value otherwise.

func (*BillingSummary) GetAvailablePlansOk

func (o *BillingSummary) GetAvailablePlansOk() ([]string, bool)

GetAvailablePlansOk returns a tuple with the AvailablePlans field value if set, nil otherwise and a boolean to check if the value has been set.

func (*BillingSummary) GetCustomerPortalAvailable

func (o *BillingSummary) GetCustomerPortalAvailable() bool

GetCustomerPortalAvailable returns the CustomerPortalAvailable field value

func (*BillingSummary) GetCustomerPortalAvailableOk

func (o *BillingSummary) GetCustomerPortalAvailableOk() (*bool, bool)

GetCustomerPortalAvailableOk returns a tuple with the CustomerPortalAvailable field value and a boolean to check if the value has been set.

func (*BillingSummary) GetFreeApiConversions added in v0.3.0

func (o *BillingSummary) GetFreeApiConversions() BillingSummaryFreeExports

GetFreeApiConversions returns the FreeApiConversions field value

func (*BillingSummary) GetFreeApiConversionsOk added in v0.3.0

func (o *BillingSummary) GetFreeApiConversionsOk() (*BillingSummaryFreeExports, bool)

GetFreeApiConversionsOk returns a tuple with the FreeApiConversions field value and a boolean to check if the value has been set.

func (*BillingSummary) GetFreeExports

func (o *BillingSummary) GetFreeExports() BillingSummaryFreeExports

GetFreeExports returns the FreeExports field value

func (*BillingSummary) GetFreeExportsOk

func (o *BillingSummary) GetFreeExportsOk() (*BillingSummaryFreeExports, bool)

GetFreeExportsOk returns a tuple with the FreeExports field value and a boolean to check if the value has been set.

func (*BillingSummary) GetMode

func (o *BillingSummary) GetMode() string

GetMode returns the Mode field value

func (*BillingSummary) GetModeOk

func (o *BillingSummary) GetModeOk() (*string, bool)

GetModeOk returns a tuple with the Mode field value and a boolean to check if the value has been set.

func (*BillingSummary) GetWebCredits

func (o *BillingSummary) GetWebCredits() BillingSummaryWebCredits

GetWebCredits returns the WebCredits field value

func (*BillingSummary) GetWebCreditsOk

func (o *BillingSummary) GetWebCreditsOk() (*BillingSummaryWebCredits, bool)

GetWebCreditsOk returns a tuple with the WebCredits field value and a boolean to check if the value has been set.

func (*BillingSummary) GetWebPro

func (o *BillingSummary) GetWebPro() BillingSummaryWebPro

GetWebPro returns the WebPro field value

func (*BillingSummary) GetWebProOk

func (o *BillingSummary) GetWebProOk() (*BillingSummaryWebPro, bool)

GetWebProOk returns a tuple with the WebPro field value and a boolean to check if the value has been set.

func (*BillingSummary) HasAvailablePlans

func (o *BillingSummary) HasAvailablePlans() bool

HasAvailablePlans returns a boolean if a field has been set.

func (BillingSummary) MarshalJSON

func (o BillingSummary) MarshalJSON() ([]byte, error)

func (*BillingSummary) SetApiCredits

func (o *BillingSummary) SetApiCredits(v BillingSummaryApiCredits)

SetApiCredits sets field value

func (*BillingSummary) SetApiStarter

func (o *BillingSummary) SetApiStarter(v BillingSummaryApiStarter)

SetApiStarter sets field value

func (*BillingSummary) SetAvailablePlans

func (o *BillingSummary) SetAvailablePlans(v []string)

SetAvailablePlans gets a reference to the given []string and assigns it to the AvailablePlans field.

func (*BillingSummary) SetCustomerPortalAvailable

func (o *BillingSummary) SetCustomerPortalAvailable(v bool)

SetCustomerPortalAvailable sets field value

func (*BillingSummary) SetFreeApiConversions added in v0.3.0

func (o *BillingSummary) SetFreeApiConversions(v BillingSummaryFreeExports)

SetFreeApiConversions sets field value

func (*BillingSummary) SetFreeExports

func (o *BillingSummary) SetFreeExports(v BillingSummaryFreeExports)

SetFreeExports sets field value

func (*BillingSummary) SetMode

func (o *BillingSummary) SetMode(v string)

SetMode sets field value

func (*BillingSummary) SetWebCredits

func (o *BillingSummary) SetWebCredits(v BillingSummaryWebCredits)

SetWebCredits sets field value

func (*BillingSummary) SetWebPro

func (o *BillingSummary) SetWebPro(v BillingSummaryWebPro)

SetWebPro sets field value

func (BillingSummary) ToMap

func (o BillingSummary) ToMap() (map[string]interface{}, error)

func (*BillingSummary) UnmarshalJSON

func (o *BillingSummary) UnmarshalJSON(data []byte) (err error)

type BillingSummaryApiCredits added in v0.3.0

type BillingSummaryApiCredits struct {
	Available            int32  `json:"available"`
	Granted              *int32 `json:"granted,omitempty"`
	AdditionalProperties map[string]interface{}
}

BillingSummaryApiCredits struct for BillingSummaryApiCredits

func NewBillingSummaryApiCredits added in v0.3.0

func NewBillingSummaryApiCredits(available int32) *BillingSummaryApiCredits

NewBillingSummaryApiCredits instantiates a new BillingSummaryApiCredits object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed

func NewBillingSummaryApiCreditsWithDefaults added in v0.3.0

func NewBillingSummaryApiCreditsWithDefaults() *BillingSummaryApiCredits

NewBillingSummaryApiCreditsWithDefaults instantiates a new BillingSummaryApiCredits object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set

func (*BillingSummaryApiCredits) GetAvailable added in v0.3.0

func (o *BillingSummaryApiCredits) GetAvailable() int32

GetAvailable returns the Available field value

func (*BillingSummaryApiCredits) GetAvailableOk added in v0.3.0

func (o *BillingSummaryApiCredits) GetAvailableOk() (*int32, bool)

GetAvailableOk returns a tuple with the Available field value and a boolean to check if the value has been set.

func (*BillingSummaryApiCredits) GetGranted added in v0.3.0

func (o *BillingSummaryApiCredits) GetGranted() int32

GetGranted returns the Granted field value if set, zero value otherwise.

func (*BillingSummaryApiCredits) GetGrantedOk added in v0.3.0

func (o *BillingSummaryApiCredits) GetGrantedOk() (*int32, bool)

GetGrantedOk returns a tuple with the Granted field value if set, nil otherwise and a boolean to check if the value has been set.

func (*BillingSummaryApiCredits) HasGranted added in v0.3.0

func (o *BillingSummaryApiCredits) HasGranted() bool

HasGranted returns a boolean if a field has been set.

func (BillingSummaryApiCredits) MarshalJSON added in v0.3.0

func (o BillingSummaryApiCredits) MarshalJSON() ([]byte, error)

func (*BillingSummaryApiCredits) SetAvailable added in v0.3.0

func (o *BillingSummaryApiCredits) SetAvailable(v int32)

SetAvailable sets field value

func (*BillingSummaryApiCredits) SetGranted added in v0.3.0

func (o *BillingSummaryApiCredits) SetGranted(v int32)

SetGranted gets a reference to the given int32 and assigns it to the Granted field.

func (BillingSummaryApiCredits) ToMap added in v0.3.0

func (o BillingSummaryApiCredits) ToMap() (map[string]interface{}, error)

func (*BillingSummaryApiCredits) UnmarshalJSON added in v0.3.0

func (o *BillingSummaryApiCredits) UnmarshalJSON(data []byte) (err error)

type BillingSummaryApiStarter

type BillingSummaryApiStarter struct {
	Plan                 NullableString `json:"plan,omitempty"`
	Active               bool           `json:"active"`
	Status               NullableString `json:"status"`
	Limit                int32          `json:"limit"`
	Used                 int32          `json:"used"`
	Remaining            int32          `json:"remaining"`
	CurrentPeriodStart   NullableString `json:"currentPeriodStart"`
	CurrentPeriodEnd     NullableString `json:"currentPeriodEnd"`
	CancelAtPeriodEnd    bool           `json:"cancelAtPeriodEnd"`
	AdditionalProperties map[string]interface{}
}

BillingSummaryApiStarter struct for BillingSummaryApiStarter

func NewBillingSummaryApiStarter

func NewBillingSummaryApiStarter(active bool, status NullableString, limit int32, used int32, remaining int32, currentPeriodStart NullableString, currentPeriodEnd NullableString, cancelAtPeriodEnd bool) *BillingSummaryApiStarter

NewBillingSummaryApiStarter instantiates a new BillingSummaryApiStarter object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed

func NewBillingSummaryApiStarterWithDefaults

func NewBillingSummaryApiStarterWithDefaults() *BillingSummaryApiStarter

NewBillingSummaryApiStarterWithDefaults instantiates a new BillingSummaryApiStarter object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set

func (*BillingSummaryApiStarter) GetActive

func (o *BillingSummaryApiStarter) GetActive() bool

GetActive returns the Active field value

func (*BillingSummaryApiStarter) GetActiveOk

func (o *BillingSummaryApiStarter) GetActiveOk() (*bool, bool)

GetActiveOk returns a tuple with the Active field value and a boolean to check if the value has been set.

func (*BillingSummaryApiStarter) GetCancelAtPeriodEnd

func (o *BillingSummaryApiStarter) GetCancelAtPeriodEnd() bool

GetCancelAtPeriodEnd returns the CancelAtPeriodEnd field value

func (*BillingSummaryApiStarter) GetCancelAtPeriodEndOk

func (o *BillingSummaryApiStarter) GetCancelAtPeriodEndOk() (*bool, bool)

GetCancelAtPeriodEndOk returns a tuple with the CancelAtPeriodEnd field value and a boolean to check if the value has been set.

func (*BillingSummaryApiStarter) GetCurrentPeriodEnd

func (o *BillingSummaryApiStarter) GetCurrentPeriodEnd() string

GetCurrentPeriodEnd returns the CurrentPeriodEnd field value If the value is explicit nil, the zero value for string will be returned

func (*BillingSummaryApiStarter) GetCurrentPeriodEndOk

func (o *BillingSummaryApiStarter) GetCurrentPeriodEndOk() (*string, bool)

GetCurrentPeriodEndOk returns a tuple with the CurrentPeriodEnd field value and a boolean to check if the value has been set. NOTE: If the value is an explicit nil, `nil, true` will be returned

func (*BillingSummaryApiStarter) GetCurrentPeriodStart

func (o *BillingSummaryApiStarter) GetCurrentPeriodStart() string

GetCurrentPeriodStart returns the CurrentPeriodStart field value If the value is explicit nil, the zero value for string will be returned

func (*BillingSummaryApiStarter) GetCurrentPeriodStartOk

func (o *BillingSummaryApiStarter) GetCurrentPeriodStartOk() (*string, bool)

GetCurrentPeriodStartOk returns a tuple with the CurrentPeriodStart field value and a boolean to check if the value has been set. NOTE: If the value is an explicit nil, `nil, true` will be returned

func (*BillingSummaryApiStarter) GetLimit

func (o *BillingSummaryApiStarter) GetLimit() int32

GetLimit returns the Limit field value

func (*BillingSummaryApiStarter) GetLimitOk

func (o *BillingSummaryApiStarter) GetLimitOk() (*int32, bool)

GetLimitOk returns a tuple with the Limit field value and a boolean to check if the value has been set.

func (*BillingSummaryApiStarter) GetPlan

func (o *BillingSummaryApiStarter) GetPlan() string

GetPlan returns the Plan field value if set, zero value otherwise (both if not set or set to explicit null).

func (*BillingSummaryApiStarter) GetPlanOk

func (o *BillingSummaryApiStarter) GetPlanOk() (*string, bool)

GetPlanOk returns a tuple with the Plan field value if set, nil otherwise and a boolean to check if the value has been set. NOTE: If the value is an explicit nil, `nil, true` will be returned

func (*BillingSummaryApiStarter) GetRemaining

func (o *BillingSummaryApiStarter) GetRemaining() int32

GetRemaining returns the Remaining field value

func (*BillingSummaryApiStarter) GetRemainingOk

func (o *BillingSummaryApiStarter) GetRemainingOk() (*int32, bool)

GetRemainingOk returns a tuple with the Remaining field value and a boolean to check if the value has been set.

func (*BillingSummaryApiStarter) GetStatus

func (o *BillingSummaryApiStarter) GetStatus() string

GetStatus returns the Status field value If the value is explicit nil, the zero value for string will be returned

func (*BillingSummaryApiStarter) GetStatusOk

func (o *BillingSummaryApiStarter) GetStatusOk() (*string, bool)

GetStatusOk returns a tuple with the Status field value and a boolean to check if the value has been set. NOTE: If the value is an explicit nil, `nil, true` will be returned

func (*BillingSummaryApiStarter) GetUsed

func (o *BillingSummaryApiStarter) GetUsed() int32

GetUsed returns the Used field value

func (*BillingSummaryApiStarter) GetUsedOk

func (o *BillingSummaryApiStarter) GetUsedOk() (*int32, bool)

GetUsedOk returns a tuple with the Used field value and a boolean to check if the value has been set.

func (*BillingSummaryApiStarter) HasPlan

func (o *BillingSummaryApiStarter) HasPlan() bool

HasPlan returns a boolean if a field has been set.

func (BillingSummaryApiStarter) MarshalJSON

func (o BillingSummaryApiStarter) MarshalJSON() ([]byte, error)

func (*BillingSummaryApiStarter) SetActive

func (o *BillingSummaryApiStarter) SetActive(v bool)

SetActive sets field value

func (*BillingSummaryApiStarter) SetCancelAtPeriodEnd

func (o *BillingSummaryApiStarter) SetCancelAtPeriodEnd(v bool)

SetCancelAtPeriodEnd sets field value

func (*BillingSummaryApiStarter) SetCurrentPeriodEnd

func (o *BillingSummaryApiStarter) SetCurrentPeriodEnd(v string)

SetCurrentPeriodEnd sets field value

func (*BillingSummaryApiStarter) SetCurrentPeriodStart

func (o *BillingSummaryApiStarter) SetCurrentPeriodStart(v string)

SetCurrentPeriodStart sets field value

func (*BillingSummaryApiStarter) SetLimit

func (o *BillingSummaryApiStarter) SetLimit(v int32)

SetLimit sets field value

func (*BillingSummaryApiStarter) SetPlan

func (o *BillingSummaryApiStarter) SetPlan(v string)

SetPlan gets a reference to the given NullableString and assigns it to the Plan field.

func (*BillingSummaryApiStarter) SetPlanNil

func (o *BillingSummaryApiStarter) SetPlanNil()

SetPlanNil sets the value for Plan to be an explicit nil

func (*BillingSummaryApiStarter) SetRemaining

func (o *BillingSummaryApiStarter) SetRemaining(v int32)

SetRemaining sets field value

func (*BillingSummaryApiStarter) SetStatus

func (o *BillingSummaryApiStarter) SetStatus(v string)

SetStatus sets field value

func (*BillingSummaryApiStarter) SetUsed

func (o *BillingSummaryApiStarter) SetUsed(v int32)

SetUsed sets field value

func (BillingSummaryApiStarter) ToMap

func (o BillingSummaryApiStarter) ToMap() (map[string]interface{}, error)

func (*BillingSummaryApiStarter) UnmarshalJSON

func (o *BillingSummaryApiStarter) UnmarshalJSON(data []byte) (err error)

func (*BillingSummaryApiStarter) UnsetPlan

func (o *BillingSummaryApiStarter) UnsetPlan()

UnsetPlan ensures that no value is present for Plan, not even an explicit nil

type BillingSummaryFreeExports

type BillingSummaryFreeExports struct {
	Limit                int32 `json:"limit"`
	Used                 int32 `json:"used"`
	Remaining            int32 `json:"remaining"`
	AdditionalProperties map[string]interface{}
}

BillingSummaryFreeExports struct for BillingSummaryFreeExports

func NewBillingSummaryFreeExports

func NewBillingSummaryFreeExports(limit int32, used int32, remaining int32) *BillingSummaryFreeExports

NewBillingSummaryFreeExports instantiates a new BillingSummaryFreeExports object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed

func NewBillingSummaryFreeExportsWithDefaults

func NewBillingSummaryFreeExportsWithDefaults() *BillingSummaryFreeExports

NewBillingSummaryFreeExportsWithDefaults instantiates a new BillingSummaryFreeExports object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set

func (*BillingSummaryFreeExports) GetLimit

func (o *BillingSummaryFreeExports) GetLimit() int32

GetLimit returns the Limit field value

func (*BillingSummaryFreeExports) GetLimitOk

func (o *BillingSummaryFreeExports) GetLimitOk() (*int32, bool)

GetLimitOk returns a tuple with the Limit field value and a boolean to check if the value has been set.

func (*BillingSummaryFreeExports) GetRemaining

func (o *BillingSummaryFreeExports) GetRemaining() int32

GetRemaining returns the Remaining field value

func (*BillingSummaryFreeExports) GetRemainingOk

func (o *BillingSummaryFreeExports) GetRemainingOk() (*int32, bool)

GetRemainingOk returns a tuple with the Remaining field value and a boolean to check if the value has been set.

func (*BillingSummaryFreeExports) GetUsed

func (o *BillingSummaryFreeExports) GetUsed() int32

GetUsed returns the Used field value

func (*BillingSummaryFreeExports) GetUsedOk

func (o *BillingSummaryFreeExports) GetUsedOk() (*int32, bool)

GetUsedOk returns a tuple with the Used field value and a boolean to check if the value has been set.

func (BillingSummaryFreeExports) MarshalJSON

func (o BillingSummaryFreeExports) MarshalJSON() ([]byte, error)

func (*BillingSummaryFreeExports) SetLimit

func (o *BillingSummaryFreeExports) SetLimit(v int32)

SetLimit sets field value

func (*BillingSummaryFreeExports) SetRemaining

func (o *BillingSummaryFreeExports) SetRemaining(v int32)

SetRemaining sets field value

func (*BillingSummaryFreeExports) SetUsed

func (o *BillingSummaryFreeExports) SetUsed(v int32)

SetUsed sets field value

func (BillingSummaryFreeExports) ToMap

func (o BillingSummaryFreeExports) ToMap() (map[string]interface{}, error)

func (*BillingSummaryFreeExports) UnmarshalJSON

func (o *BillingSummaryFreeExports) UnmarshalJSON(data []byte) (err error)

type BillingSummaryWebCredits

type BillingSummaryWebCredits struct {
	Available            int32 `json:"available"`
	AdditionalProperties map[string]interface{}
}

BillingSummaryWebCredits struct for BillingSummaryWebCredits

func NewBillingSummaryWebCredits

func NewBillingSummaryWebCredits(available int32) *BillingSummaryWebCredits

NewBillingSummaryWebCredits instantiates a new BillingSummaryWebCredits object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed

func NewBillingSummaryWebCreditsWithDefaults

func NewBillingSummaryWebCreditsWithDefaults() *BillingSummaryWebCredits

NewBillingSummaryWebCreditsWithDefaults instantiates a new BillingSummaryWebCredits object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set

func (*BillingSummaryWebCredits) GetAvailable

func (o *BillingSummaryWebCredits) GetAvailable() int32

GetAvailable returns the Available field value

func (*BillingSummaryWebCredits) GetAvailableOk

func (o *BillingSummaryWebCredits) GetAvailableOk() (*int32, bool)

GetAvailableOk returns a tuple with the Available field value and a boolean to check if the value has been set.

func (BillingSummaryWebCredits) MarshalJSON

func (o BillingSummaryWebCredits) MarshalJSON() ([]byte, error)

func (*BillingSummaryWebCredits) SetAvailable

func (o *BillingSummaryWebCredits) SetAvailable(v int32)

SetAvailable sets field value

func (BillingSummaryWebCredits) ToMap

func (o BillingSummaryWebCredits) ToMap() (map[string]interface{}, error)

func (*BillingSummaryWebCredits) UnmarshalJSON

func (o *BillingSummaryWebCredits) UnmarshalJSON(data []byte) (err error)

type BillingSummaryWebPro

type BillingSummaryWebPro struct {
	Active               bool           `json:"active"`
	Status               NullableString `json:"status"`
	CurrentPeriodEnd     NullableString `json:"currentPeriodEnd"`
	CancelAtPeriodEnd    bool           `json:"cancelAtPeriodEnd"`
	AdditionalProperties map[string]interface{}
}

BillingSummaryWebPro struct for BillingSummaryWebPro

func NewBillingSummaryWebPro

func NewBillingSummaryWebPro(active bool, status NullableString, currentPeriodEnd NullableString, cancelAtPeriodEnd bool) *BillingSummaryWebPro

NewBillingSummaryWebPro instantiates a new BillingSummaryWebPro object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed

func NewBillingSummaryWebProWithDefaults

func NewBillingSummaryWebProWithDefaults() *BillingSummaryWebPro

NewBillingSummaryWebProWithDefaults instantiates a new BillingSummaryWebPro object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set

func (*BillingSummaryWebPro) GetActive

func (o *BillingSummaryWebPro) GetActive() bool

GetActive returns the Active field value

func (*BillingSummaryWebPro) GetActiveOk

func (o *BillingSummaryWebPro) GetActiveOk() (*bool, bool)

GetActiveOk returns a tuple with the Active field value and a boolean to check if the value has been set.

func (*BillingSummaryWebPro) GetCancelAtPeriodEnd

func (o *BillingSummaryWebPro) GetCancelAtPeriodEnd() bool

GetCancelAtPeriodEnd returns the CancelAtPeriodEnd field value

func (*BillingSummaryWebPro) GetCancelAtPeriodEndOk

func (o *BillingSummaryWebPro) GetCancelAtPeriodEndOk() (*bool, bool)

GetCancelAtPeriodEndOk returns a tuple with the CancelAtPeriodEnd field value and a boolean to check if the value has been set.

func (*BillingSummaryWebPro) GetCurrentPeriodEnd

func (o *BillingSummaryWebPro) GetCurrentPeriodEnd() string

GetCurrentPeriodEnd returns the CurrentPeriodEnd field value If the value is explicit nil, the zero value for string will be returned

func (*BillingSummaryWebPro) GetCurrentPeriodEndOk

func (o *BillingSummaryWebPro) GetCurrentPeriodEndOk() (*string, bool)

GetCurrentPeriodEndOk returns a tuple with the CurrentPeriodEnd field value and a boolean to check if the value has been set. NOTE: If the value is an explicit nil, `nil, true` will be returned

func (*BillingSummaryWebPro) GetStatus

func (o *BillingSummaryWebPro) GetStatus() string

GetStatus returns the Status field value If the value is explicit nil, the zero value for string will be returned

func (*BillingSummaryWebPro) GetStatusOk

func (o *BillingSummaryWebPro) GetStatusOk() (*string, bool)

GetStatusOk returns a tuple with the Status field value and a boolean to check if the value has been set. NOTE: If the value is an explicit nil, `nil, true` will be returned

func (BillingSummaryWebPro) MarshalJSON

func (o BillingSummaryWebPro) MarshalJSON() ([]byte, error)

func (*BillingSummaryWebPro) SetActive

func (o *BillingSummaryWebPro) SetActive(v bool)

SetActive sets field value

func (*BillingSummaryWebPro) SetCancelAtPeriodEnd

func (o *BillingSummaryWebPro) SetCancelAtPeriodEnd(v bool)

SetCancelAtPeriodEnd sets field value

func (*BillingSummaryWebPro) SetCurrentPeriodEnd

func (o *BillingSummaryWebPro) SetCurrentPeriodEnd(v string)

SetCurrentPeriodEnd sets field value

func (*BillingSummaryWebPro) SetStatus

func (o *BillingSummaryWebPro) SetStatus(v string)

SetStatus sets field value

func (BillingSummaryWebPro) ToMap

func (o BillingSummaryWebPro) ToMap() (map[string]interface{}, error)

func (*BillingSummaryWebPro) UnmarshalJSON

func (o *BillingSummaryWebPro) UnmarshalJSON(data []byte) (err error)

type Client added in v0.3.0

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

Client owns the generated transport and all temporary upload/download files. Calls never retry automatically. Borrowed readers remain open.

func NewClient added in v0.3.0

func NewClient(apiKey string, options ...ClientOption) *Client

func (*Client) Convert added in v0.3.0

func (c *Client) Convert(ctx context.Context, image any, options ...ConvertOptions) (*Conversion, error)

Convert accepts []byte, an io.Reader, or a filesystem path string.

func (*Client) ConvertImage added in v0.3.0

func (c *Client) ConvertImage(ctx context.Context, image any, options ...ConvertOptions) (*Conversion, error)

func (*Client) Download added in v0.3.0

func (c *Client) Download(ctx context.Context, id, format string) ([]byte, error)

func (*Client) GetAllowance added in v0.3.0

func (c *Client) GetAllowance(ctx context.Context) (*BillingSummary, error)

func (*Client) GetVector added in v0.3.0

func (c *Client) GetVector(ctx context.Context, id, format string) ([]byte, error)

func (*Client) Health added in v0.3.0

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

type ClientOption added in v0.3.0

type ClientOption func(*Configuration)

func WithBaseURL added in v0.3.0

func WithBaseURL(origin string) ClientOption

func WithTimeout added in v0.3.0

func WithTimeout(timeout time.Duration) ClientOption

type Configuration

type Configuration struct {
	Host             string            `json:"host,omitempty"`
	Scheme           string            `json:"scheme,omitempty"`
	DefaultHeader    map[string]string `json:"defaultHeader,omitempty"`
	UserAgent        string            `json:"userAgent,omitempty"`
	Debug            bool              `json:"debug,omitempty"`
	Servers          ServerConfigurations
	OperationServers map[string]ServerConfigurations
	HTTPClient       *http.Client
}

Configuration stores the configuration of the API client

func NewConfiguration

func NewConfiguration() *Configuration

NewConfiguration returns a new Configuration object

func (*Configuration) AddDefaultHeader

func (c *Configuration) AddDefaultHeader(key string, value string)

AddDefaultHeader adds a new HTTP header to the default header in the request

func (*Configuration) ServerURL

func (c *Configuration) ServerURL(index int, variables map[string]string) (string, error)

ServerURL returns URL based on server settings

func (*Configuration) ServerURLWithContext

func (c *Configuration) ServerURLWithContext(ctx context.Context, endpoint string) (string, error)

ServerURLWithContext returns a new server URL given an endpoint

type Conversion

type Conversion struct {
	Svg          string `json:"svg"`
	Format       string `json:"format"`
	ConversionId string `json:"conversion_id"`
	ProcessingMs int32  `json:"processing_ms"`
	// Artwork path count, excluding clipping paths, masks, definitions and seam helpers. Not a quality score.
	Paths                 int32  `json:"paths"`
	OptimizedBytes        int32  `json:"optimized_bytes"`
	AllowanceUsedThisCall *int32 `json:"allowance_used_this_call,omitempty"`
	ReusedResult          *bool  `json:"reused_result,omitempty"`
	AdditionalProperties  map[string]interface{}
}

Conversion struct for Conversion

func NewConversion

func NewConversion(svg string, format string, conversionId string, processingMs int32, paths int32, optimizedBytes int32) *Conversion

NewConversion instantiates a new Conversion object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed

func NewConversionWithDefaults

func NewConversionWithDefaults() *Conversion

NewConversionWithDefaults instantiates a new Conversion object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set

func (*Conversion) GetAllowanceUsedThisCall

func (o *Conversion) GetAllowanceUsedThisCall() int32

GetAllowanceUsedThisCall returns the AllowanceUsedThisCall field value if set, zero value otherwise.

func (*Conversion) GetAllowanceUsedThisCallOk

func (o *Conversion) GetAllowanceUsedThisCallOk() (*int32, bool)

GetAllowanceUsedThisCallOk returns a tuple with the AllowanceUsedThisCall field value if set, nil otherwise and a boolean to check if the value has been set.

func (*Conversion) GetConversionId

func (o *Conversion) GetConversionId() string

GetConversionId returns the ConversionId field value

func (*Conversion) GetConversionIdOk

func (o *Conversion) GetConversionIdOk() (*string, bool)

GetConversionIdOk returns a tuple with the ConversionId field value and a boolean to check if the value has been set.

func (*Conversion) GetFormat

func (o *Conversion) GetFormat() string

GetFormat returns the Format field value

func (*Conversion) GetFormatOk

func (o *Conversion) GetFormatOk() (*string, bool)

GetFormatOk returns a tuple with the Format field value and a boolean to check if the value has been set.

func (*Conversion) GetOptimizedBytes

func (o *Conversion) GetOptimizedBytes() int32

GetOptimizedBytes returns the OptimizedBytes field value

func (*Conversion) GetOptimizedBytesOk

func (o *Conversion) GetOptimizedBytesOk() (*int32, bool)

GetOptimizedBytesOk returns a tuple with the OptimizedBytes field value and a boolean to check if the value has been set.

func (*Conversion) GetPaths

func (o *Conversion) GetPaths() int32

GetPaths returns the Paths field value

func (*Conversion) GetPathsOk

func (o *Conversion) GetPathsOk() (*int32, bool)

GetPathsOk returns a tuple with the Paths field value and a boolean to check if the value has been set.

func (*Conversion) GetProcessingMs

func (o *Conversion) GetProcessingMs() int32

GetProcessingMs returns the ProcessingMs field value

func (*Conversion) GetProcessingMsOk

func (o *Conversion) GetProcessingMsOk() (*int32, bool)

GetProcessingMsOk returns a tuple with the ProcessingMs field value and a boolean to check if the value has been set.

func (*Conversion) GetReusedResult

func (o *Conversion) GetReusedResult() bool

GetReusedResult returns the ReusedResult field value if set, zero value otherwise.

func (*Conversion) GetReusedResultOk

func (o *Conversion) GetReusedResultOk() (*bool, bool)

GetReusedResultOk returns a tuple with the ReusedResult field value if set, nil otherwise and a boolean to check if the value has been set.

func (*Conversion) GetSvg

func (o *Conversion) GetSvg() string

GetSvg returns the Svg field value

func (*Conversion) GetSvgOk

func (o *Conversion) GetSvgOk() (*string, bool)

GetSvgOk returns a tuple with the Svg field value and a boolean to check if the value has been set.

func (*Conversion) HasAllowanceUsedThisCall

func (o *Conversion) HasAllowanceUsedThisCall() bool

HasAllowanceUsedThisCall returns a boolean if a field has been set.

func (*Conversion) HasReusedResult

func (o *Conversion) HasReusedResult() bool

HasReusedResult returns a boolean if a field has been set.

func (Conversion) MarshalJSON

func (o Conversion) MarshalJSON() ([]byte, error)

func (*Conversion) SetAllowanceUsedThisCall

func (o *Conversion) SetAllowanceUsedThisCall(v int32)

SetAllowanceUsedThisCall gets a reference to the given int32 and assigns it to the AllowanceUsedThisCall field.

func (*Conversion) SetConversionId

func (o *Conversion) SetConversionId(v string)

SetConversionId sets field value

func (*Conversion) SetFormat

func (o *Conversion) SetFormat(v string)

SetFormat sets field value

func (*Conversion) SetOptimizedBytes

func (o *Conversion) SetOptimizedBytes(v int32)

SetOptimizedBytes sets field value

func (*Conversion) SetPaths

func (o *Conversion) SetPaths(v int32)

SetPaths sets field value

func (*Conversion) SetProcessingMs

func (o *Conversion) SetProcessingMs(v int32)

SetProcessingMs sets field value

func (*Conversion) SetReusedResult

func (o *Conversion) SetReusedResult(v bool)

SetReusedResult gets a reference to the given bool and assigns it to the ReusedResult field.

func (*Conversion) SetSvg

func (o *Conversion) SetSvg(v string)

SetSvg sets field value

func (Conversion) ToMap

func (o Conversion) ToMap() (map[string]interface{}, error)

func (*Conversion) UnmarshalJSON

func (o *Conversion) UnmarshalJSON(data []byte) (err error)

type ConvertOptions added in v0.3.0

type ConvertOptions struct {
	Filename       string
	IdempotencyKey string
}

type DefaultAPIService

type DefaultAPIService service

DefaultAPIService DefaultAPI service

func (*DefaultAPIService) ConvertImage

ConvertImage Convert a PNG, JPG, GIF, BMP or WebP into SVG

Use for user-requested vectorization. Maximum 10 MiB and 4000000 pixels (4096 per side). Requires remaining monthly API allowance or granted API credits. One successful request consumes one conversion. Reuse the same Idempotency-Key and image when retrying. Processing can take up to 240 seconds. Plan-based limits are shared across API keys, browser sessions, legacy routes and MCP. Starter permits 60 requests/minute, 6 conversion/export attempts/minute and one concurrent engine job; larger plans permit 120–300 requests/minute, 12–60 engine attempts/minute and two concurrent engine jobs. See x-vectali-plan-limits and https://vectali.com/docs/api-lifecycle/#rate-limits. PDF/EPS/DXF exports share the engine budget; saved SVG downloads do not. Attempts, including invalid requests and completed retries, count toward the minute budget. RateLimit-Limit, RateLimit-Remaining, RateLimit-Reset and RateLimit-Scope identify the applicable window; Retry-After accompanies 429. Concurrency limits return concurrency_limited and X-Concurrency-Limit. Photos and tiny details may need manual cleanup.

@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiConvertImageRequest

func (*DefaultAPIService) ConvertImageExecute

func (a *DefaultAPIService) ConvertImageExecute(r ApiConvertImageRequest) (*Conversion, *http.Response, error)

Execute executes the request

@return Conversion

func (*DefaultAPIService) GetAllowance

GetAllowance Read current account allowance

Read monthly API allowance (apiStarter.remaining), free lifetime API trial conversions (freeApiConversions.remaining), and total non-subscription API credits (apiCredits.available, which combines free trial conversions and apiCredits.granted). Total available conversions is apiStarter.remaining + apiCredits.available; free trials and granted credits work without a subscription. No purchases or changes. Account request limits depend on the active API plan and are shared with legacy routes and MCP; see x-vectali-plan-limits.

@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiGetAllowanceRequest

func (*DefaultAPIService) GetAllowanceExecute

Execute executes the request

@return BillingSummary

func (*DefaultAPIService) GetVector

func (a *DefaultAPIService) GetVector(ctx context.Context, conversionId string, format string) ApiGetVectorRequest

GetVector Download an owned vector as SVG, PDF, EPS or DXF

Export the saved SVG after validating account ownership. Native PDF/EPS/DXF generation also shares the account engine-attempt and concurrency limits; saved SVG downloads need no engine slot. PDF preserves vector paint; EPS uses a white matte and simplifies mesh paint. DXF exports outlines in millimeters at 96 px/inch. Does not consume another conversion. Account request limits depend on the active API plan and are shared with legacy routes and MCP; see x-vectali-plan-limits.

@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param conversionId
@param format
@return ApiGetVectorRequest

func (*DefaultAPIService) GetVectorExecute

func (a *DefaultAPIService) GetVectorExecute(r ApiGetVectorRequest) (*os.File, *http.Response, error)

Execute executes the request

@return *os.File

func (*DefaultAPIService) Health

Health Check service availability

Public service availability probe. Does not expose account information or run a conversion.

@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiHealthRequest

func (*DefaultAPIService) HealthExecute

Execute executes the request

@return Health200Response

type Error

type Error struct {
	Error                string `json:"error"`
	Code                 string `json:"code"`
	AdditionalProperties map[string]interface{}
}

Error struct for Error

func NewError

func NewError(error_ string, code string) *Error

NewError instantiates a new Error object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed

func NewErrorWithDefaults

func NewErrorWithDefaults() *Error

NewErrorWithDefaults instantiates a new Error object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set

func (*Error) GetCode

func (o *Error) GetCode() string

GetCode returns the Code field value

func (*Error) GetCodeOk

func (o *Error) GetCodeOk() (*string, bool)

GetCodeOk returns a tuple with the Code field value and a boolean to check if the value has been set.

func (*Error) GetError

func (o *Error) GetError() string

GetError returns the Error field value

func (*Error) GetErrorOk

func (o *Error) GetErrorOk() (*string, bool)

GetErrorOk returns a tuple with the Error field value and a boolean to check if the value has been set.

func (Error) MarshalJSON

func (o Error) MarshalJSON() ([]byte, error)

func (*Error) SetCode

func (o *Error) SetCode(v string)

SetCode sets field value

func (*Error) SetError

func (o *Error) SetError(v string)

SetError sets field value

func (Error) ToMap

func (o Error) ToMap() (map[string]interface{}, error)

func (*Error) UnmarshalJSON

func (o *Error) UnmarshalJSON(data []byte) (err error)

type GenericOpenAPIError

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

GenericOpenAPIError Provides access to the body, error and model on returned errors.

func (GenericOpenAPIError) Body

func (e GenericOpenAPIError) Body() []byte

Body returns the raw bytes of the response

func (GenericOpenAPIError) Error

func (e GenericOpenAPIError) Error() string

Error returns non-empty string if there was an error.

func (GenericOpenAPIError) Model

func (e GenericOpenAPIError) Model() interface{}

Model returns the unpacked model of the error

type Health200Response

type Health200Response struct {
	Ok                   bool `json:"ok"`
	AdditionalProperties map[string]interface{}
}

Health200Response struct for Health200Response

func NewHealth200Response

func NewHealth200Response(ok bool) *Health200Response

NewHealth200Response instantiates a new Health200Response object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed

func NewHealth200ResponseWithDefaults

func NewHealth200ResponseWithDefaults() *Health200Response

NewHealth200ResponseWithDefaults instantiates a new Health200Response object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set

func (*Health200Response) GetOk

func (o *Health200Response) GetOk() bool

GetOk returns the Ok field value

func (*Health200Response) GetOkOk

func (o *Health200Response) GetOkOk() (*bool, bool)

GetOkOk returns a tuple with the Ok field value and a boolean to check if the value has been set.

func (Health200Response) MarshalJSON

func (o Health200Response) MarshalJSON() ([]byte, error)

func (*Health200Response) SetOk

func (o *Health200Response) SetOk(v bool)

SetOk sets field value

func (Health200Response) ToMap

func (o Health200Response) ToMap() (map[string]interface{}, error)

func (*Health200Response) UnmarshalJSON

func (o *Health200Response) UnmarshalJSON(data []byte) (err error)

type MappedNullable

type MappedNullable interface {
	ToMap() (map[string]interface{}, error)
}

type NullableBillingSummary

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

func NewNullableBillingSummary

func NewNullableBillingSummary(val *BillingSummary) *NullableBillingSummary

func (NullableBillingSummary) Get

func (NullableBillingSummary) IsSet

func (v NullableBillingSummary) IsSet() bool

func (NullableBillingSummary) MarshalJSON

func (v NullableBillingSummary) MarshalJSON() ([]byte, error)

func (*NullableBillingSummary) Set

func (*NullableBillingSummary) UnmarshalJSON

func (v *NullableBillingSummary) UnmarshalJSON(src []byte) error

func (*NullableBillingSummary) Unset

func (v *NullableBillingSummary) Unset()

type NullableBillingSummaryApiCredits added in v0.3.0

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

func NewNullableBillingSummaryApiCredits added in v0.3.0

func NewNullableBillingSummaryApiCredits(val *BillingSummaryApiCredits) *NullableBillingSummaryApiCredits

func (NullableBillingSummaryApiCredits) Get added in v0.3.0

func (NullableBillingSummaryApiCredits) IsSet added in v0.3.0

func (NullableBillingSummaryApiCredits) MarshalJSON added in v0.3.0

func (v NullableBillingSummaryApiCredits) MarshalJSON() ([]byte, error)

func (*NullableBillingSummaryApiCredits) Set added in v0.3.0

func (*NullableBillingSummaryApiCredits) UnmarshalJSON added in v0.3.0

func (v *NullableBillingSummaryApiCredits) UnmarshalJSON(src []byte) error

func (*NullableBillingSummaryApiCredits) Unset added in v0.3.0

type NullableBillingSummaryApiStarter

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

func (NullableBillingSummaryApiStarter) Get

func (NullableBillingSummaryApiStarter) IsSet

func (NullableBillingSummaryApiStarter) MarshalJSON

func (v NullableBillingSummaryApiStarter) MarshalJSON() ([]byte, error)

func (*NullableBillingSummaryApiStarter) Set

func (*NullableBillingSummaryApiStarter) UnmarshalJSON

func (v *NullableBillingSummaryApiStarter) UnmarshalJSON(src []byte) error

func (*NullableBillingSummaryApiStarter) Unset

type NullableBillingSummaryFreeExports

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

func (NullableBillingSummaryFreeExports) Get

func (NullableBillingSummaryFreeExports) IsSet

func (NullableBillingSummaryFreeExports) MarshalJSON

func (v NullableBillingSummaryFreeExports) MarshalJSON() ([]byte, error)

func (*NullableBillingSummaryFreeExports) Set

func (*NullableBillingSummaryFreeExports) UnmarshalJSON

func (v *NullableBillingSummaryFreeExports) UnmarshalJSON(src []byte) error

func (*NullableBillingSummaryFreeExports) Unset

type NullableBillingSummaryWebCredits

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

func (NullableBillingSummaryWebCredits) Get

func (NullableBillingSummaryWebCredits) IsSet

func (NullableBillingSummaryWebCredits) MarshalJSON

func (v NullableBillingSummaryWebCredits) MarshalJSON() ([]byte, error)

func (*NullableBillingSummaryWebCredits) Set

func (*NullableBillingSummaryWebCredits) UnmarshalJSON

func (v *NullableBillingSummaryWebCredits) UnmarshalJSON(src []byte) error

func (*NullableBillingSummaryWebCredits) Unset

type NullableBillingSummaryWebPro

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

func NewNullableBillingSummaryWebPro

func NewNullableBillingSummaryWebPro(val *BillingSummaryWebPro) *NullableBillingSummaryWebPro

func (NullableBillingSummaryWebPro) Get

func (NullableBillingSummaryWebPro) IsSet

func (NullableBillingSummaryWebPro) MarshalJSON

func (v NullableBillingSummaryWebPro) MarshalJSON() ([]byte, error)

func (*NullableBillingSummaryWebPro) Set

func (*NullableBillingSummaryWebPro) UnmarshalJSON

func (v *NullableBillingSummaryWebPro) UnmarshalJSON(src []byte) error

func (*NullableBillingSummaryWebPro) Unset

func (v *NullableBillingSummaryWebPro) Unset()

type NullableBool

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

func NewNullableBool

func NewNullableBool(val *bool) *NullableBool

func (NullableBool) Get

func (v NullableBool) Get() *bool

func (NullableBool) IsSet

func (v NullableBool) IsSet() bool

func (NullableBool) MarshalJSON

func (v NullableBool) MarshalJSON() ([]byte, error)

func (*NullableBool) Set

func (v *NullableBool) Set(val *bool)

func (*NullableBool) UnmarshalJSON

func (v *NullableBool) UnmarshalJSON(src []byte) error

func (*NullableBool) Unset

func (v *NullableBool) Unset()

type NullableConversion

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

func NewNullableConversion

func NewNullableConversion(val *Conversion) *NullableConversion

func (NullableConversion) Get

func (v NullableConversion) Get() *Conversion

func (NullableConversion) IsSet

func (v NullableConversion) IsSet() bool

func (NullableConversion) MarshalJSON

func (v NullableConversion) MarshalJSON() ([]byte, error)

func (*NullableConversion) Set

func (v *NullableConversion) Set(val *Conversion)

func (*NullableConversion) UnmarshalJSON

func (v *NullableConversion) UnmarshalJSON(src []byte) error

func (*NullableConversion) Unset

func (v *NullableConversion) Unset()

type NullableError

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

func NewNullableError

func NewNullableError(val *Error) *NullableError

func (NullableError) Get

func (v NullableError) Get() *Error

func (NullableError) IsSet

func (v NullableError) IsSet() bool

func (NullableError) MarshalJSON

func (v NullableError) MarshalJSON() ([]byte, error)

func (*NullableError) Set

func (v *NullableError) Set(val *Error)

func (*NullableError) UnmarshalJSON

func (v *NullableError) UnmarshalJSON(src []byte) error

func (*NullableError) Unset

func (v *NullableError) Unset()

type NullableFloat32

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

func NewNullableFloat32

func NewNullableFloat32(val *float32) *NullableFloat32

func (NullableFloat32) Get

func (v NullableFloat32) Get() *float32

func (NullableFloat32) IsSet

func (v NullableFloat32) IsSet() bool

func (NullableFloat32) MarshalJSON

func (v NullableFloat32) MarshalJSON() ([]byte, error)

func (*NullableFloat32) Set

func (v *NullableFloat32) Set(val *float32)

func (*NullableFloat32) UnmarshalJSON

func (v *NullableFloat32) UnmarshalJSON(src []byte) error

func (*NullableFloat32) Unset

func (v *NullableFloat32) Unset()

type NullableFloat64

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

func NewNullableFloat64

func NewNullableFloat64(val *float64) *NullableFloat64

func (NullableFloat64) Get

func (v NullableFloat64) Get() *float64

func (NullableFloat64) IsSet

func (v NullableFloat64) IsSet() bool

func (NullableFloat64) MarshalJSON

func (v NullableFloat64) MarshalJSON() ([]byte, error)

func (*NullableFloat64) Set

func (v *NullableFloat64) Set(val *float64)

func (*NullableFloat64) UnmarshalJSON

func (v *NullableFloat64) UnmarshalJSON(src []byte) error

func (*NullableFloat64) Unset

func (v *NullableFloat64) Unset()

type NullableHealth200Response

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

func NewNullableHealth200Response

func NewNullableHealth200Response(val *Health200Response) *NullableHealth200Response

func (NullableHealth200Response) Get

func (NullableHealth200Response) IsSet

func (v NullableHealth200Response) IsSet() bool

func (NullableHealth200Response) MarshalJSON

func (v NullableHealth200Response) MarshalJSON() ([]byte, error)

func (*NullableHealth200Response) Set

func (*NullableHealth200Response) UnmarshalJSON

func (v *NullableHealth200Response) UnmarshalJSON(src []byte) error

func (*NullableHealth200Response) Unset

func (v *NullableHealth200Response) Unset()

type NullableInt

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

func NewNullableInt

func NewNullableInt(val *int) *NullableInt

func (NullableInt) Get

func (v NullableInt) Get() *int

func (NullableInt) IsSet

func (v NullableInt) IsSet() bool

func (NullableInt) MarshalJSON

func (v NullableInt) MarshalJSON() ([]byte, error)

func (*NullableInt) Set

func (v *NullableInt) Set(val *int)

func (*NullableInt) UnmarshalJSON

func (v *NullableInt) UnmarshalJSON(src []byte) error

func (*NullableInt) Unset

func (v *NullableInt) Unset()

type NullableInt32

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

func NewNullableInt32

func NewNullableInt32(val *int32) *NullableInt32

func (NullableInt32) Get

func (v NullableInt32) Get() *int32

func (NullableInt32) IsSet

func (v NullableInt32) IsSet() bool

func (NullableInt32) MarshalJSON

func (v NullableInt32) MarshalJSON() ([]byte, error)

func (*NullableInt32) Set

func (v *NullableInt32) Set(val *int32)

func (*NullableInt32) UnmarshalJSON

func (v *NullableInt32) UnmarshalJSON(src []byte) error

func (*NullableInt32) Unset

func (v *NullableInt32) Unset()

type NullableInt64

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

func NewNullableInt64

func NewNullableInt64(val *int64) *NullableInt64

func (NullableInt64) Get

func (v NullableInt64) Get() *int64

func (NullableInt64) IsSet

func (v NullableInt64) IsSet() bool

func (NullableInt64) MarshalJSON

func (v NullableInt64) MarshalJSON() ([]byte, error)

func (*NullableInt64) Set

func (v *NullableInt64) Set(val *int64)

func (*NullableInt64) UnmarshalJSON

func (v *NullableInt64) UnmarshalJSON(src []byte) error

func (*NullableInt64) Unset

func (v *NullableInt64) Unset()

type NullableString

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

func NewNullableString

func NewNullableString(val *string) *NullableString

func (NullableString) Get

func (v NullableString) Get() *string

func (NullableString) IsSet

func (v NullableString) IsSet() bool

func (NullableString) MarshalJSON

func (v NullableString) MarshalJSON() ([]byte, error)

func (*NullableString) Set

func (v *NullableString) Set(val *string)

func (*NullableString) UnmarshalJSON

func (v *NullableString) UnmarshalJSON(src []byte) error

func (*NullableString) Unset

func (v *NullableString) Unset()

type NullableTime

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

func NewNullableTime

func NewNullableTime(val *time.Time) *NullableTime

func (NullableTime) Get

func (v NullableTime) Get() *time.Time

func (NullableTime) IsSet

func (v NullableTime) IsSet() bool

func (NullableTime) MarshalJSON

func (v NullableTime) MarshalJSON() ([]byte, error)

func (*NullableTime) Set

func (v *NullableTime) Set(val *time.Time)

func (*NullableTime) UnmarshalJSON

func (v *NullableTime) UnmarshalJSON(src []byte) error

func (*NullableTime) Unset

func (v *NullableTime) Unset()

type ResponseError added in v0.3.0

type ResponseError struct {
	Response *http.Response
	Err      error
}

ResponseError retains HTTP diagnostics and the generated error.

func (*ResponseError) Error added in v0.3.0

func (e *ResponseError) Error() string

func (*ResponseError) Unwrap added in v0.3.0

func (e *ResponseError) Unwrap() error

type ServerConfiguration

type ServerConfiguration struct {
	URL         string
	Description string
	Variables   map[string]ServerVariable
}

ServerConfiguration stores the information about a server

type ServerConfigurations

type ServerConfigurations []ServerConfiguration

ServerConfigurations stores multiple ServerConfiguration items

func (ServerConfigurations) URL

func (sc ServerConfigurations) URL(index int, variables map[string]string) (string, error)

URL formats template on a index using given variables

type ServerVariable

type ServerVariable struct {
	Description  string
	DefaultValue string
	EnumValues   []string
}

ServerVariable stores the information about a server variable

Directories

Path Synopsis
Local transport contract test.
Local transport contract test.

Jump to

Keyboard shortcuts

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