localizely

package module
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2022 License: MIT Imports: 22 Imported by: 0

README

Go API client for localizely

Getting started

Localizely API is built on REST.
You can use this API for importing & exporting your localization files in order to automate the process with `curl` scripts or external CI tools.
Response is returned in JSON form even in case of error.

If you Authenticate with your API token on this page by clicking \"Authorize\" button, you can make API calls directly from here with \"Try it out\", and generate such `curl` examples.

API Authentication

Authenticate your account by sending your API token as a request header `X-Api-Token`.
The token can be found under My Profile page.
A user must have an Admin role in the project in order to access the project with his token.
API requests without authentication will fail.

Base url: `https://api.localizely.com`

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: 1.2.1
  • Package version: 1.0.0
  • Build package: org.openapitools.codegen.languages.GoClientCodegen

Installation

Install the following dependencies:

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

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

import localizely "github.com/localizely/localizely-client-go"

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 sw.ContextServerIndex of type int.

ctx := context.WithValue(context.Background(), localizely.ContextServerIndex, 1)
Templated Server URL

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

ctx := context.WithValue(context.Background(), localizely.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 sw.ContextOperationServerIndices and sw.ContextOperationServerVariables context maps.

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

Documentation for API Endpoints

All URIs are relative to https://api.localizely.com

Class Method HTTP request Description
BranchAPIApi CreateBranch Post /v1/projects/{project_id}/branches/{branch} Create a new branch
DownloadAPIApi GetLocalizationFile Get /v1/projects/{project_id}/files/download Download translations for a language in a specified file format
TranslationStatusAPIApi GetTranslationStatus Get /v1/projects/{project_id}/status Get Translation Status for the project
UploadAPIApi ImportLocalizationFile Post /v1/projects/{project_id}/files/upload Upload translations for a language

Documentation For Models

Documentation For Authorization

API auth
  • Type: API key
  • API key parameter name: X-Api-Token
  • Location: HTTP header

Note, each API key must be added to a map of map[string]APIKey where the key is: X-Api-Token and passed in as the auth context for each request.

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ContextOAuth2 takes an oauth2.TokenSource as authentication for the request.
	ContextOAuth2 = contextKey("token")

	// ContextBasicAuth takes BasicAuth as authentication for the request.
	ContextBasicAuth = contextKey("basic")

	// ContextAccessToken takes a string oauth2 access token as authentication for the request.
	ContextAccessToken = contextKey("accesstoken")

	// ContextAPIKeys takes a string apikey as authentication for the request
	ContextAPIKeys = contextKey("apiKeys")

	// ContextHttpSignatureAuth takes HttpSignatureAuth as authentication for the request.
	ContextHttpSignatureAuth = contextKey("httpsignature")

	// 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 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 {
	BranchAPIApi *BranchAPIApiService

	DownloadAPIApi *DownloadAPIApiService

	TranslationStatusAPIApi *TranslationStatusAPIApiService

	UploadAPIApi *UploadAPIApiService
	// contains filtered or unexported fields
}

APIClient manages communication with the Localizely API API v1.2.1 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.

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 ApiCreateBranchRequest

type ApiCreateBranchRequest struct {
	ApiService *BranchAPIApiService
	// contains filtered or unexported fields
}

func (ApiCreateBranchRequest) Execute

func (r ApiCreateBranchRequest) Execute() (*http.Response, error)

func (ApiCreateBranchRequest) SourceBranch

func (r ApiCreateBranchRequest) SourceBranch(sourceBranch string) ApiCreateBranchRequest

Name of the source branch from which new branch will be created

type ApiGetLocalizationFileRequest

type ApiGetLocalizationFileRequest struct {
	ApiService *DownloadAPIApiService
	// contains filtered or unexported fields
}

func (ApiGetLocalizationFileRequest) Branch

Name of the branch to download file from. Only in case of activated branching feature.

func (ApiGetLocalizationFileRequest) ExcludeTags

Optional list of tags to be excluded from download. <br>If not set, all string keys will be considered for download. <br><br> Multiple tags can be defined in a following way: `&exclude_tags=REMOVED&exclude_tags=REMOVED_SPRINT05`.

func (ApiGetLocalizationFileRequest) Execute

func (ApiGetLocalizationFileRequest) ExportEmptyAs

Optional. How you would like empty translations to be exported. Allowed values are `empty` to keep empty, `main` to replace with the main language value, or `skip` to omit.

func (ApiGetLocalizationFileRequest) IncludeTags

Optional list of tags to be downloaded. <br>If not set, all string keys will be considered for download. <br><br>Multiple tags can be defined in a following way: `&include_tags=ANDROID&include_tags=ANDROID_SPRINT05`.

func (ApiGetLocalizationFileRequest) JavaPropertiesEncoding

func (r ApiGetLocalizationFileRequest) JavaPropertiesEncoding(javaPropertiesEncoding string) ApiGetLocalizationFileRequest

(Only for Java .properties files download) Character encoding. Default is `latin_1`.

func (ApiGetLocalizationFileRequest) LangCodes

Language to download, specified as language code. e.g. `en`, `en_GB` or `en-GB`. For multiple languages use comma separator. If omitted, all languages are downloaded.

func (ApiGetLocalizationFileRequest) Type_

File format

type ApiGetTranslationStatusRequest

type ApiGetTranslationStatusRequest struct {
	ApiService *TranslationStatusAPIApiService
	// contains filtered or unexported fields
}

func (ApiGetTranslationStatusRequest) Branch

Name of the branch to get translation status for. Only in case of activated branching feature.

func (ApiGetTranslationStatusRequest) Execute

type ApiImportLocalizationFileRequest

type ApiImportLocalizationFileRequest struct {
	ApiService *UploadAPIApiService
	// contains filtered or unexported fields
}

func (ApiImportLocalizationFileRequest) Branch

Name of the branch to upload file into. Only in case of activated branching feature.

func (ApiImportLocalizationFileRequest) Execute

func (ApiImportLocalizationFileRequest) File

Uploading file. Supported following formats: `Flutter ARB, Android XML, iOS strings, iOS stringsdict, Angular XLF, Gettext PO, Gettext POT, Java properties, Ruby on Rails yaml, .NET resx, flat json, csv, Excel .xlsx, Excel .xls`

func (ApiImportLocalizationFileRequest) LangCode

Language to upload, specified as language code. e.g. `en`, `en_GB` or `en-GB`

func (ApiImportLocalizationFileRequest) Overwrite

If translation in given language should be overwritten with modified translation from uploading file.

func (ApiImportLocalizationFileRequest) Reviewed

If uploading translations, that are added, should be marked as Reviewed. For uploading translations that are only modified it will have effect only if `overwrite` is set to `true`.

func (ApiImportLocalizationFileRequest) TagAdded

Optional list of tags to add to new translations from uploading file. <br><br>Multiple tags can be defined in a following way: `&tag_added_keys=NEW&tag_added_keys=NEW_SPRINT05`

func (ApiImportLocalizationFileRequest) TagRemoved

Optional list of tags to add to removed translations from uploading file. <br><br>Multiple tags can be defined in a following way: `&tag_removed_keys=REMOVED&tag_removed_keys=REMOVED_SPRINT05`

func (ApiImportLocalizationFileRequest) TagUpdated

Optional list of tags to add to updated translations from uploading file. <br><br>Multiple tags can be defined in a following way: `&tag_updated_keys=UPDATED&tag_updated_keys=UPDATED_SPRINT05`

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 BranchAPIApiService

type BranchAPIApiService service

BranchAPIApiService BranchAPIApi service

func (*BranchAPIApiService) CreateBranch

func (a *BranchAPIApiService) CreateBranch(ctx context.Context, projectId string, branch string) ApiCreateBranchRequest

CreateBranch Create a new branch

@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param projectId Project ID - Can be found on 'My projects' page
@param branch Name of the branch to be created
@return ApiCreateBranchRequest

func (*BranchAPIApiService) CreateBranchExecute

func (a *BranchAPIApiService) CreateBranchExecute(r ApiCreateBranchRequest) (*http.Response, error)

Execute executes the request

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 DownloadAPIApiService

type DownloadAPIApiService service

DownloadAPIApiService DownloadAPIApi service

func (*DownloadAPIApiService) GetLocalizationFile

func (a *DownloadAPIApiService) GetLocalizationFile(ctx context.Context, projectId string) ApiGetLocalizationFileRequest

GetLocalizationFile Download translations for a language in a specified file format

<b>Note:</b> This endpoint is intended for getting translation files to your source-code. This endpoint should not be called directly from you app in runtime, as it has <b>rate-limiting</b>. <br/>For over-the-air translation updates please consider using our <a href="https://localizely.com/flutter-over-the-air/" target="_blank">SDK for Flutter</a> or <a href="https://localizely.com/aws-s3-integration/" target="_blank">integrate with AWS S3 bucket</a>.

@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param projectId Project ID - Can be found on 'My projects' page
@return ApiGetLocalizationFileRequest

func (*DownloadAPIApiService) GetLocalizationFileExecute

func (a *DownloadAPIApiService) GetLocalizationFileExecute(r ApiGetLocalizationFileRequest) (*http.Response, error)

Execute executes the request

type ErrorDto

type ErrorDto struct {
	ErrorCode    *string                           `json:"errorCode,omitempty"`
	ErrorMessage *string                           `json:"errorMessage,omitempty"`
	ErrorData    map[string]map[string]interface{} `json:"errorData,omitempty"`
}

ErrorDto struct for ErrorDto

func NewErrorDto

func NewErrorDto() *ErrorDto

NewErrorDto instantiates a new ErrorDto 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 NewErrorDtoWithDefaults

func NewErrorDtoWithDefaults() *ErrorDto

NewErrorDtoWithDefaults instantiates a new ErrorDto 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 (*ErrorDto) GetErrorCode

func (o *ErrorDto) GetErrorCode() string

GetErrorCode returns the ErrorCode field value if set, zero value otherwise.

func (*ErrorDto) GetErrorCodeOk

func (o *ErrorDto) GetErrorCodeOk() (*string, bool)

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

func (*ErrorDto) GetErrorData

func (o *ErrorDto) GetErrorData() map[string]map[string]interface{}

GetErrorData returns the ErrorData field value if set, zero value otherwise.

func (*ErrorDto) GetErrorDataOk

func (o *ErrorDto) GetErrorDataOk() (map[string]map[string]interface{}, bool)

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

func (*ErrorDto) GetErrorMessage

func (o *ErrorDto) GetErrorMessage() string

GetErrorMessage returns the ErrorMessage field value if set, zero value otherwise.

func (*ErrorDto) GetErrorMessageOk

func (o *ErrorDto) GetErrorMessageOk() (*string, bool)

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

func (*ErrorDto) HasErrorCode

func (o *ErrorDto) HasErrorCode() bool

HasErrorCode returns a boolean if a field has been set.

func (*ErrorDto) HasErrorData

func (o *ErrorDto) HasErrorData() bool

HasErrorData returns a boolean if a field has been set.

func (*ErrorDto) HasErrorMessage

func (o *ErrorDto) HasErrorMessage() bool

HasErrorMessage returns a boolean if a field has been set.

func (ErrorDto) MarshalJSON

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

func (*ErrorDto) SetErrorCode

func (o *ErrorDto) SetErrorCode(v string)

SetErrorCode gets a reference to the given string and assigns it to the ErrorCode field.

func (*ErrorDto) SetErrorData

func (o *ErrorDto) SetErrorData(v map[string]map[string]interface{})

SetErrorData gets a reference to the given map[string]map[string]interface{} and assigns it to the ErrorData field.

func (*ErrorDto) SetErrorMessage

func (o *ErrorDto) SetErrorMessage(v string)

SetErrorMessage gets a reference to the given string and assigns it to the ErrorMessage field.

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 ImportFileError

type ImportFileError struct {
	Line         *int32  `json:"line,omitempty"`
	Position     *int32  `json:"position,omitempty"`
	ErrorMessage *string `json:"errorMessage,omitempty"`
}

ImportFileError struct for ImportFileError

func NewImportFileError

func NewImportFileError() *ImportFileError

NewImportFileError instantiates a new ImportFileError 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 NewImportFileErrorWithDefaults

func NewImportFileErrorWithDefaults() *ImportFileError

NewImportFileErrorWithDefaults instantiates a new ImportFileError 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 (*ImportFileError) GetErrorMessage

func (o *ImportFileError) GetErrorMessage() string

GetErrorMessage returns the ErrorMessage field value if set, zero value otherwise.

func (*ImportFileError) GetErrorMessageOk

func (o *ImportFileError) GetErrorMessageOk() (*string, bool)

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

func (*ImportFileError) GetLine

func (o *ImportFileError) GetLine() int32

GetLine returns the Line field value if set, zero value otherwise.

func (*ImportFileError) GetLineOk

func (o *ImportFileError) GetLineOk() (*int32, bool)

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

func (*ImportFileError) GetPosition

func (o *ImportFileError) GetPosition() int32

GetPosition returns the Position field value if set, zero value otherwise.

func (*ImportFileError) GetPositionOk

func (o *ImportFileError) GetPositionOk() (*int32, bool)

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

func (*ImportFileError) HasErrorMessage

func (o *ImportFileError) HasErrorMessage() bool

HasErrorMessage returns a boolean if a field has been set.

func (*ImportFileError) HasLine

func (o *ImportFileError) HasLine() bool

HasLine returns a boolean if a field has been set.

func (*ImportFileError) HasPosition

func (o *ImportFileError) HasPosition() bool

HasPosition returns a boolean if a field has been set.

func (ImportFileError) MarshalJSON

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

func (*ImportFileError) SetErrorMessage

func (o *ImportFileError) SetErrorMessage(v string)

SetErrorMessage gets a reference to the given string and assigns it to the ErrorMessage field.

func (*ImportFileError) SetLine

func (o *ImportFileError) SetLine(v int32)

SetLine gets a reference to the given int32 and assigns it to the Line field.

func (*ImportFileError) SetPosition

func (o *ImportFileError) SetPosition(v int32)

SetPosition gets a reference to the given int32 and assigns it to the Position field.

type InvalidImportFileErrorDto

type InvalidImportFileErrorDto struct {
	ErrorCode    *string                           `json:"errorCode,omitempty"`
	ErrorMessage *string                           `json:"errorMessage,omitempty"`
	ErrorData    map[string]map[string]interface{} `json:"errorData,omitempty"`
	Errors       []ImportFileError                 `json:"errors,omitempty"`
}

InvalidImportFileErrorDto struct for InvalidImportFileErrorDto

func NewInvalidImportFileErrorDto

func NewInvalidImportFileErrorDto() *InvalidImportFileErrorDto

NewInvalidImportFileErrorDto instantiates a new InvalidImportFileErrorDto 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 NewInvalidImportFileErrorDtoWithDefaults

func NewInvalidImportFileErrorDtoWithDefaults() *InvalidImportFileErrorDto

NewInvalidImportFileErrorDtoWithDefaults instantiates a new InvalidImportFileErrorDto 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 (*InvalidImportFileErrorDto) GetErrorCode

func (o *InvalidImportFileErrorDto) GetErrorCode() string

GetErrorCode returns the ErrorCode field value if set, zero value otherwise.

func (*InvalidImportFileErrorDto) GetErrorCodeOk

func (o *InvalidImportFileErrorDto) GetErrorCodeOk() (*string, bool)

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

func (*InvalidImportFileErrorDto) GetErrorData

func (o *InvalidImportFileErrorDto) GetErrorData() map[string]map[string]interface{}

GetErrorData returns the ErrorData field value if set, zero value otherwise.

func (*InvalidImportFileErrorDto) GetErrorDataOk

func (o *InvalidImportFileErrorDto) GetErrorDataOk() (map[string]map[string]interface{}, bool)

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

func (*InvalidImportFileErrorDto) GetErrorMessage

func (o *InvalidImportFileErrorDto) GetErrorMessage() string

GetErrorMessage returns the ErrorMessage field value if set, zero value otherwise.

func (*InvalidImportFileErrorDto) GetErrorMessageOk

func (o *InvalidImportFileErrorDto) GetErrorMessageOk() (*string, bool)

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

func (*InvalidImportFileErrorDto) GetErrors

func (o *InvalidImportFileErrorDto) GetErrors() []ImportFileError

GetErrors returns the Errors field value if set, zero value otherwise.

func (*InvalidImportFileErrorDto) GetErrorsOk

func (o *InvalidImportFileErrorDto) GetErrorsOk() ([]ImportFileError, bool)

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

func (*InvalidImportFileErrorDto) HasErrorCode

func (o *InvalidImportFileErrorDto) HasErrorCode() bool

HasErrorCode returns a boolean if a field has been set.

func (*InvalidImportFileErrorDto) HasErrorData

func (o *InvalidImportFileErrorDto) HasErrorData() bool

HasErrorData returns a boolean if a field has been set.

func (*InvalidImportFileErrorDto) HasErrorMessage

func (o *InvalidImportFileErrorDto) HasErrorMessage() bool

HasErrorMessage returns a boolean if a field has been set.

func (*InvalidImportFileErrorDto) HasErrors

func (o *InvalidImportFileErrorDto) HasErrors() bool

HasErrors returns a boolean if a field has been set.

func (InvalidImportFileErrorDto) MarshalJSON

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

func (*InvalidImportFileErrorDto) SetErrorCode

func (o *InvalidImportFileErrorDto) SetErrorCode(v string)

SetErrorCode gets a reference to the given string and assigns it to the ErrorCode field.

func (*InvalidImportFileErrorDto) SetErrorData

func (o *InvalidImportFileErrorDto) SetErrorData(v map[string]map[string]interface{})

SetErrorData gets a reference to the given map[string]map[string]interface{} and assigns it to the ErrorData field.

func (*InvalidImportFileErrorDto) SetErrorMessage

func (o *InvalidImportFileErrorDto) SetErrorMessage(v string)

SetErrorMessage gets a reference to the given string and assigns it to the ErrorMessage field.

func (*InvalidImportFileErrorDto) SetErrors

func (o *InvalidImportFileErrorDto) SetErrors(v []ImportFileError)

SetErrors gets a reference to the given []ImportFileError and assigns it to the Errors field.

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 NullableErrorDto

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

func NewNullableErrorDto

func NewNullableErrorDto(val *ErrorDto) *NullableErrorDto

func (NullableErrorDto) Get

func (v NullableErrorDto) Get() *ErrorDto

func (NullableErrorDto) IsSet

func (v NullableErrorDto) IsSet() bool

func (NullableErrorDto) MarshalJSON

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

func (*NullableErrorDto) Set

func (v *NullableErrorDto) Set(val *ErrorDto)

func (*NullableErrorDto) UnmarshalJSON

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

func (*NullableErrorDto) Unset

func (v *NullableErrorDto) 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 NullableImportFileError

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

func NewNullableImportFileError

func NewNullableImportFileError(val *ImportFileError) *NullableImportFileError

func (NullableImportFileError) Get

func (NullableImportFileError) IsSet

func (v NullableImportFileError) IsSet() bool

func (NullableImportFileError) MarshalJSON

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

func (*NullableImportFileError) Set

func (*NullableImportFileError) UnmarshalJSON

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

func (*NullableImportFileError) Unset

func (v *NullableImportFileError) 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 NullableInvalidImportFileErrorDto

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

func (NullableInvalidImportFileErrorDto) Get

func (NullableInvalidImportFileErrorDto) IsSet

func (NullableInvalidImportFileErrorDto) MarshalJSON

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

func (*NullableInvalidImportFileErrorDto) Set

func (*NullableInvalidImportFileErrorDto) UnmarshalJSON

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

func (*NullableInvalidImportFileErrorDto) Unset

type NullableProjectLocaleStatsDto

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

func (NullableProjectLocaleStatsDto) Get

func (NullableProjectLocaleStatsDto) IsSet

func (NullableProjectLocaleStatsDto) MarshalJSON

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

func (*NullableProjectLocaleStatsDto) Set

func (*NullableProjectLocaleStatsDto) UnmarshalJSON

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

func (*NullableProjectLocaleStatsDto) Unset

func (v *NullableProjectLocaleStatsDto) Unset()

type NullableProjectStatusDto

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

func NewNullableProjectStatusDto

func NewNullableProjectStatusDto(val *ProjectStatusDto) *NullableProjectStatusDto

func (NullableProjectStatusDto) Get

func (NullableProjectStatusDto) IsSet

func (v NullableProjectStatusDto) IsSet() bool

func (NullableProjectStatusDto) MarshalJSON

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

func (*NullableProjectStatusDto) Set

func (*NullableProjectStatusDto) UnmarshalJSON

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

func (*NullableProjectStatusDto) Unset

func (v *NullableProjectStatusDto) 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 ProjectLocaleStatsDto

type ProjectLocaleStatsDto struct {
	// Language code (ie `en` or `en-US`)
	LangCode *string `json:"langCode,omitempty"`
	// Language name (ie `English` or `English (US)`)
	LangName *string `json:"langName,omitempty"`
	// Total number of string keys in the project
	Strings *int32 `json:"strings,omitempty"`
	// Number of reviewed string keys for a language
	Reviewed *int32 `json:"reviewed,omitempty"`
	// Reviewed progress for a language, in percentage
	ReviewedProgress *int32 `json:"reviewedProgress,omitempty"`
}

ProjectLocaleStatsDto Translation status per language

func NewProjectLocaleStatsDto

func NewProjectLocaleStatsDto() *ProjectLocaleStatsDto

NewProjectLocaleStatsDto instantiates a new ProjectLocaleStatsDto 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 NewProjectLocaleStatsDtoWithDefaults

func NewProjectLocaleStatsDtoWithDefaults() *ProjectLocaleStatsDto

NewProjectLocaleStatsDtoWithDefaults instantiates a new ProjectLocaleStatsDto 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 (*ProjectLocaleStatsDto) GetLangCode

func (o *ProjectLocaleStatsDto) GetLangCode() string

GetLangCode returns the LangCode field value if set, zero value otherwise.

func (*ProjectLocaleStatsDto) GetLangCodeOk

func (o *ProjectLocaleStatsDto) GetLangCodeOk() (*string, bool)

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

func (*ProjectLocaleStatsDto) GetLangName

func (o *ProjectLocaleStatsDto) GetLangName() string

GetLangName returns the LangName field value if set, zero value otherwise.

func (*ProjectLocaleStatsDto) GetLangNameOk

func (o *ProjectLocaleStatsDto) GetLangNameOk() (*string, bool)

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

func (*ProjectLocaleStatsDto) GetReviewed

func (o *ProjectLocaleStatsDto) GetReviewed() int32

GetReviewed returns the Reviewed field value if set, zero value otherwise.

func (*ProjectLocaleStatsDto) GetReviewedOk

func (o *ProjectLocaleStatsDto) GetReviewedOk() (*int32, bool)

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

func (*ProjectLocaleStatsDto) GetReviewedProgress

func (o *ProjectLocaleStatsDto) GetReviewedProgress() int32

GetReviewedProgress returns the ReviewedProgress field value if set, zero value otherwise.

func (*ProjectLocaleStatsDto) GetReviewedProgressOk

func (o *ProjectLocaleStatsDto) GetReviewedProgressOk() (*int32, bool)

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

func (*ProjectLocaleStatsDto) GetStrings

func (o *ProjectLocaleStatsDto) GetStrings() int32

GetStrings returns the Strings field value if set, zero value otherwise.

func (*ProjectLocaleStatsDto) GetStringsOk

func (o *ProjectLocaleStatsDto) GetStringsOk() (*int32, bool)

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

func (*ProjectLocaleStatsDto) HasLangCode

func (o *ProjectLocaleStatsDto) HasLangCode() bool

HasLangCode returns a boolean if a field has been set.

func (*ProjectLocaleStatsDto) HasLangName

func (o *ProjectLocaleStatsDto) HasLangName() bool

HasLangName returns a boolean if a field has been set.

func (*ProjectLocaleStatsDto) HasReviewed

func (o *ProjectLocaleStatsDto) HasReviewed() bool

HasReviewed returns a boolean if a field has been set.

func (*ProjectLocaleStatsDto) HasReviewedProgress

func (o *ProjectLocaleStatsDto) HasReviewedProgress() bool

HasReviewedProgress returns a boolean if a field has been set.

func (*ProjectLocaleStatsDto) HasStrings

func (o *ProjectLocaleStatsDto) HasStrings() bool

HasStrings returns a boolean if a field has been set.

func (ProjectLocaleStatsDto) MarshalJSON

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

func (*ProjectLocaleStatsDto) SetLangCode

func (o *ProjectLocaleStatsDto) SetLangCode(v string)

SetLangCode gets a reference to the given string and assigns it to the LangCode field.

func (*ProjectLocaleStatsDto) SetLangName

func (o *ProjectLocaleStatsDto) SetLangName(v string)

SetLangName gets a reference to the given string and assigns it to the LangName field.

func (*ProjectLocaleStatsDto) SetReviewed

func (o *ProjectLocaleStatsDto) SetReviewed(v int32)

SetReviewed gets a reference to the given int32 and assigns it to the Reviewed field.

func (*ProjectLocaleStatsDto) SetReviewedProgress

func (o *ProjectLocaleStatsDto) SetReviewedProgress(v int32)

SetReviewedProgress gets a reference to the given int32 and assigns it to the ReviewedProgress field.

func (*ProjectLocaleStatsDto) SetStrings

func (o *ProjectLocaleStatsDto) SetStrings(v int32)

SetStrings gets a reference to the given int32 and assigns it to the Strings field.

type ProjectStatusDto

type ProjectStatusDto struct {
	// Total number of string keys in the project
	Strings *int32 `json:"strings,omitempty"`
	// Total reviewed progress across all languages, in percentage
	ReviewedProgress *int32 `json:"reviewedProgress,omitempty"`
	// Translation status per language
	Languages []ProjectLocaleStatsDto `json:"languages,omitempty"`
}

ProjectStatusDto struct for ProjectStatusDto

func NewProjectStatusDto

func NewProjectStatusDto() *ProjectStatusDto

NewProjectStatusDto instantiates a new ProjectStatusDto 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 NewProjectStatusDtoWithDefaults

func NewProjectStatusDtoWithDefaults() *ProjectStatusDto

NewProjectStatusDtoWithDefaults instantiates a new ProjectStatusDto 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 (*ProjectStatusDto) GetLanguages

func (o *ProjectStatusDto) GetLanguages() []ProjectLocaleStatsDto

GetLanguages returns the Languages field value if set, zero value otherwise.

func (*ProjectStatusDto) GetLanguagesOk

func (o *ProjectStatusDto) GetLanguagesOk() ([]ProjectLocaleStatsDto, bool)

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

func (*ProjectStatusDto) GetReviewedProgress

func (o *ProjectStatusDto) GetReviewedProgress() int32

GetReviewedProgress returns the ReviewedProgress field value if set, zero value otherwise.

func (*ProjectStatusDto) GetReviewedProgressOk

func (o *ProjectStatusDto) GetReviewedProgressOk() (*int32, bool)

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

func (*ProjectStatusDto) GetStrings

func (o *ProjectStatusDto) GetStrings() int32

GetStrings returns the Strings field value if set, zero value otherwise.

func (*ProjectStatusDto) GetStringsOk

func (o *ProjectStatusDto) GetStringsOk() (*int32, bool)

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

func (*ProjectStatusDto) HasLanguages

func (o *ProjectStatusDto) HasLanguages() bool

HasLanguages returns a boolean if a field has been set.

func (*ProjectStatusDto) HasReviewedProgress

func (o *ProjectStatusDto) HasReviewedProgress() bool

HasReviewedProgress returns a boolean if a field has been set.

func (*ProjectStatusDto) HasStrings

func (o *ProjectStatusDto) HasStrings() bool

HasStrings returns a boolean if a field has been set.

func (ProjectStatusDto) MarshalJSON

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

func (*ProjectStatusDto) SetLanguages

func (o *ProjectStatusDto) SetLanguages(v []ProjectLocaleStatsDto)

SetLanguages gets a reference to the given []ProjectLocaleStatsDto and assigns it to the Languages field.

func (*ProjectStatusDto) SetReviewedProgress

func (o *ProjectStatusDto) SetReviewedProgress(v int32)

SetReviewedProgress gets a reference to the given int32 and assigns it to the ReviewedProgress field.

func (*ProjectStatusDto) SetStrings

func (o *ProjectStatusDto) SetStrings(v int32)

SetStrings gets a reference to the given int32 and assigns it to the Strings field.

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

type TranslationStatusAPIApiService

type TranslationStatusAPIApiService service

TranslationStatusAPIApiService TranslationStatusAPIApi service

func (*TranslationStatusAPIApiService) GetTranslationStatus

GetTranslationStatus Get Translation Status for the project

@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param projectId Project ID - Can be found on 'My projects' page
@return ApiGetTranslationStatusRequest

func (*TranslationStatusAPIApiService) GetTranslationStatusExecute

Execute executes the request

@return ProjectStatusDto

type UploadAPIApiService

type UploadAPIApiService service

UploadAPIApiService UploadAPIApi service

func (*UploadAPIApiService) ImportLocalizationFile

func (a *UploadAPIApiService) ImportLocalizationFile(ctx context.Context, projectId string) ApiImportLocalizationFileRequest

ImportLocalizationFile Upload translations for a language

@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param projectId Project ID - Can be found on 'My projects' page
@return ApiImportLocalizationFileRequest

func (*UploadAPIApiService) ImportLocalizationFileExecute

func (a *UploadAPIApiService) ImportLocalizationFileExecute(r ApiImportLocalizationFileRequest) (*http.Response, error)

Execute executes the request

Jump to

Keyboard shortcuts

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