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") )
func CacheExpires(r *http.Response) time.Time
CacheExpires helper function to determine remaining time before repeating a request.
func PtrBool(v bool) *bool
PtrBool is a helper routine that returns a pointer to given boolean value.
func PtrFloat32(v float32) *float32
PtrFloat32 is a helper routine that returns a pointer to given float value.
func PtrFloat64(v float64) *float64
PtrFloat64 is a helper routine that returns a pointer to given float value.
func PtrInt(v int) *int
PtrInt is a helper routine that returns a pointer to given integer value.
func PtrInt32(v int32) *int32
PtrInt32 is a helper routine that returns a pointer to given integer value.
func PtrInt64(v int64) *int64
PtrInt64 is a helper routine that returns a pointer to given integer value.
func PtrString(v string) *string
PtrString is a helper routine that returns a pointer to given string value.
func PtrTime(v time.Time) *time.Time
PtrTime is helper routine that returns a pointer to given Time value.
APIClient manages communication with the GoBun File Store API v0.0.1 In most cases there should be only one, shared, APIClient.
type APIClient struct { DefaultApi *DefaultApiService // contains filtered or unexported fields }
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 (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
APIKey provides API key based authentication to a request passed via context using ContextAPIKey
type APIKey struct { Key string Prefix string }
APIResponse stores the API response returned by the server.
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:"-"` }
func NewAPIResponse(r *http.Response) *APIResponse
NewAPIResponse returns a new APIResponse object.
func NewAPIResponseWithError(errorMessage string) *APIResponse
NewAPIResponseWithError returns a new APIResponse object with the provided error message.
type ApiListGetRequest struct { ApiService *DefaultApiService // contains filtered or unexported fields }
func (r ApiListGetRequest) Execute() ([]string, *http.Response, error)
type ApiRootPostRequest struct { ApiService *DefaultApiService // contains filtered or unexported fields }
func (r ApiRootPostRequest) Body(body *os.File) ApiRootPostRequest
a replay file
func (r ApiRootPostRequest) Execute() (*http.Response, error)
BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth
type BasicAuth struct { UserName string `json:"userName,omitempty"` Password string `json:"password,omitempty"` }
Configuration stores the configuration of the API client
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 }
func NewConfiguration() *Configuration
NewConfiguration returns a new Configuration object
func (c *Configuration) AddDefaultHeader(key string, value string)
AddDefaultHeader adds a new HTTP header to the default header in the request
func (c *Configuration) ServerURL(index int, variables map[string]string) (string, error)
ServerURL returns URL based on server settings
func (c *Configuration) ServerURLWithContext(ctx context.Context, endpoint string) (string, error)
ServerURLWithContext returns a new server URL given an endpoint
DefaultApiService DefaultApi service
type DefaultApiService service
func (a *DefaultApiService) ListGet(ctx context.Context) ApiListGetRequest
ListGet Get the list of replay files
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiListGetRequest
func (a *DefaultApiService) ListGetExecute(r ApiListGetRequest) ([]string, *http.Response, error)
Execute executes the request
@return []string
func (a *DefaultApiService) RootPost(ctx context.Context) ApiRootPostRequest
RootPost Upload a new replay file
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiRootPostRequest
func (a *DefaultApiService) RootPostExecute(r ApiRootPostRequest) (*http.Response, error)
Execute executes the request
GenericOpenAPIError Provides access to the body, error and model on returned errors.
type GenericOpenAPIError struct {
// contains filtered or unexported fields
}
func (e GenericOpenAPIError) Body() []byte
Body returns the raw bytes of the response
func (e GenericOpenAPIError) Error() string
Error returns non-empty string if there was an error.
func (e GenericOpenAPIError) Model() interface{}
Model returns the unpacked model of the error
Graphql struct for Graphql
type Graphql struct { Data map[string]interface{} `json:"data,omitempty"` Errors []map[string]interface{} `json:"errors,omitempty"` }
func NewGraphql() *Graphql
NewGraphql instantiates a new Graphql 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 NewGraphqlWithDefaults() *Graphql
NewGraphqlWithDefaults instantiates a new Graphql 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 (o *Graphql) GetData() map[string]interface{}
GetData returns the Data field value if set, zero value otherwise.
func (o *Graphql) GetDataOk() (map[string]interface{}, bool)
GetDataOk returns a tuple with the Data field value if set, nil otherwise and a boolean to check if the value has been set.
func (o *Graphql) GetErrors() []map[string]interface{}
GetErrors returns the Errors field value if set, zero value otherwise.
func (o *Graphql) GetErrorsOk() ([]map[string]interface{}, 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 (o *Graphql) HasData() bool
HasData returns a boolean if a field has been set.
func (o *Graphql) HasErrors() bool
HasErrors returns a boolean if a field has been set.
func (o Graphql) MarshalJSON() ([]byte, error)
func (o *Graphql) SetData(v map[string]interface{})
SetData gets a reference to the given map[string]interface{} and assigns it to the Data field.
func (o *Graphql) SetErrors(v []map[string]interface{})
SetErrors gets a reference to the given []map[string]interface{} and assigns it to the Errors field.
type NullableBool struct {
// contains filtered or unexported fields
}
func NewNullableBool(val *bool) *NullableBool
func (v NullableBool) Get() *bool
func (v NullableBool) IsSet() bool
func (v NullableBool) MarshalJSON() ([]byte, error)
func (v *NullableBool) Set(val *bool)
func (v *NullableBool) UnmarshalJSON(src []byte) error
func (v *NullableBool) Unset()
type NullableFloat32 struct {
// contains filtered or unexported fields
}
func NewNullableFloat32(val *float32) *NullableFloat32
func (v NullableFloat32) Get() *float32
func (v NullableFloat32) IsSet() bool
func (v NullableFloat32) MarshalJSON() ([]byte, error)
func (v *NullableFloat32) Set(val *float32)
func (v *NullableFloat32) UnmarshalJSON(src []byte) error
func (v *NullableFloat32) Unset()
type NullableFloat64 struct {
// contains filtered or unexported fields
}
func NewNullableFloat64(val *float64) *NullableFloat64
func (v NullableFloat64) Get() *float64
func (v NullableFloat64) IsSet() bool
func (v NullableFloat64) MarshalJSON() ([]byte, error)
func (v *NullableFloat64) Set(val *float64)
func (v *NullableFloat64) UnmarshalJSON(src []byte) error
func (v *NullableFloat64) Unset()
type NullableGraphql struct {
// contains filtered or unexported fields
}
func NewNullableGraphql(val *Graphql) *NullableGraphql
func (v NullableGraphql) Get() *Graphql
func (v NullableGraphql) IsSet() bool
func (v NullableGraphql) MarshalJSON() ([]byte, error)
func (v *NullableGraphql) Set(val *Graphql)
func (v *NullableGraphql) UnmarshalJSON(src []byte) error
func (v *NullableGraphql) Unset()
type NullableInt struct {
// contains filtered or unexported fields
}
func NewNullableInt(val *int) *NullableInt
func (v NullableInt) Get() *int
func (v NullableInt) IsSet() bool
func (v NullableInt) MarshalJSON() ([]byte, error)
func (v *NullableInt) Set(val *int)
func (v *NullableInt) UnmarshalJSON(src []byte) error
func (v *NullableInt) Unset()
type NullableInt32 struct {
// contains filtered or unexported fields
}
func NewNullableInt32(val *int32) *NullableInt32
func (v NullableInt32) Get() *int32
func (v NullableInt32) IsSet() bool
func (v NullableInt32) MarshalJSON() ([]byte, error)
func (v *NullableInt32) Set(val *int32)
func (v *NullableInt32) UnmarshalJSON(src []byte) error
func (v *NullableInt32) Unset()
type NullableInt64 struct {
// contains filtered or unexported fields
}
func NewNullableInt64(val *int64) *NullableInt64
func (v NullableInt64) Get() *int64
func (v NullableInt64) IsSet() bool
func (v NullableInt64) MarshalJSON() ([]byte, error)
func (v *NullableInt64) Set(val *int64)
func (v *NullableInt64) UnmarshalJSON(src []byte) error
func (v *NullableInt64) Unset()
type NullablePlayerEntry struct {
// contains filtered or unexported fields
}
func NewNullablePlayerEntry(val *PlayerEntry) *NullablePlayerEntry
func (v NullablePlayerEntry) Get() *PlayerEntry
func (v NullablePlayerEntry) IsSet() bool
func (v NullablePlayerEntry) MarshalJSON() ([]byte, error)
func (v *NullablePlayerEntry) Set(val *PlayerEntry)
func (v *NullablePlayerEntry) UnmarshalJSON(src []byte) error
func (v *NullablePlayerEntry) Unset()
type NullableReplay struct {
// contains filtered or unexported fields
}
func NewNullableReplay(val *Replay) *NullableReplay
func (v NullableReplay) Get() *Replay
func (v NullableReplay) IsSet() bool
func (v NullableReplay) MarshalJSON() ([]byte, error)
func (v *NullableReplay) Set(val *Replay)
func (v *NullableReplay) UnmarshalJSON(src []byte) error
func (v *NullableReplay) Unset()
type NullableString struct {
// contains filtered or unexported fields
}
func NewNullableString(val *string) *NullableString
func (v NullableString) Get() *string
func (v NullableString) IsSet() bool
func (v NullableString) MarshalJSON() ([]byte, error)
func (v *NullableString) Set(val *string)
func (v *NullableString) UnmarshalJSON(src []byte) error
func (v *NullableString) Unset()
type NullableTime struct {
// contains filtered or unexported fields
}
func NewNullableTime(val *time.Time) *NullableTime
func (v NullableTime) Get() *time.Time
func (v NullableTime) IsSet() bool
func (v NullableTime) MarshalJSON() ([]byte, error)
func (v *NullableTime) Set(val *time.Time)
func (v *NullableTime) UnmarshalJSON(src []byte) error
func (v *NullableTime) Unset()
PlayerEntry struct for PlayerEntry
type PlayerEntry struct { Name *string `json:"Name,omitempty"` Skin *string `json:"Skin,omitempty"` Color *string `json:"Color,omitempty"` Score *float32 `json:"Score,omitempty"` Speed *float32 `json:"Speed,omitempty"` Weight *float32 `json:"Weight,omitempty"` }
func NewPlayerEntry() *PlayerEntry
NewPlayerEntry instantiates a new PlayerEntry 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 NewPlayerEntryWithDefaults() *PlayerEntry
NewPlayerEntryWithDefaults instantiates a new PlayerEntry 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 (o *PlayerEntry) GetColor() string
GetColor returns the Color field value if set, zero value otherwise.
func (o *PlayerEntry) GetColorOk() (*string, bool)
GetColorOk returns a tuple with the Color field value if set, nil otherwise and a boolean to check if the value has been set.
func (o *PlayerEntry) GetName() string
GetName returns the Name field value if set, zero value otherwise.
func (o *PlayerEntry) GetNameOk() (*string, bool)
GetNameOk returns a tuple with the Name field value if set, nil otherwise and a boolean to check if the value has been set.
func (o *PlayerEntry) GetScore() float32
GetScore returns the Score field value if set, zero value otherwise.
func (o *PlayerEntry) GetScoreOk() (*float32, bool)
GetScoreOk returns a tuple with the Score field value if set, nil otherwise and a boolean to check if the value has been set.
func (o *PlayerEntry) GetSkin() string
GetSkin returns the Skin field value if set, zero value otherwise.
func (o *PlayerEntry) GetSkinOk() (*string, bool)
GetSkinOk returns a tuple with the Skin field value if set, nil otherwise and a boolean to check if the value has been set.
func (o *PlayerEntry) GetSpeed() float32
GetSpeed returns the Speed field value if set, zero value otherwise.
func (o *PlayerEntry) GetSpeedOk() (*float32, bool)
GetSpeedOk returns a tuple with the Speed field value if set, nil otherwise and a boolean to check if the value has been set.
func (o *PlayerEntry) GetWeight() float32
GetWeight returns the Weight field value if set, zero value otherwise.
func (o *PlayerEntry) GetWeightOk() (*float32, bool)
GetWeightOk returns a tuple with the Weight field value if set, nil otherwise and a boolean to check if the value has been set.
func (o *PlayerEntry) HasColor() bool
HasColor returns a boolean if a field has been set.
func (o *PlayerEntry) HasName() bool
HasName returns a boolean if a field has been set.
func (o *PlayerEntry) HasScore() bool
HasScore returns a boolean if a field has been set.
func (o *PlayerEntry) HasSkin() bool
HasSkin returns a boolean if a field has been set.
func (o *PlayerEntry) HasSpeed() bool
HasSpeed returns a boolean if a field has been set.
func (o *PlayerEntry) HasWeight() bool
HasWeight returns a boolean if a field has been set.
func (o PlayerEntry) MarshalJSON() ([]byte, error)
func (o *PlayerEntry) SetColor(v string)
SetColor gets a reference to the given string and assigns it to the Color field.
func (o *PlayerEntry) SetName(v string)
SetName gets a reference to the given string and assigns it to the Name field.
func (o *PlayerEntry) SetScore(v float32)
SetScore gets a reference to the given float32 and assigns it to the Score field.
func (o *PlayerEntry) SetSkin(v string)
SetSkin gets a reference to the given string and assigns it to the Skin field.
func (o *PlayerEntry) SetSpeed(v float32)
SetSpeed gets a reference to the given float32 and assigns it to the Speed field.
func (o *PlayerEntry) SetWeight(v float32)
SetWeight gets a reference to the given float32 and assigns it to the Weight field.
Replay struct for Replay
type Replay struct { Title *string `json:"Title,omitempty"` GameMap *float32 `json:"GameMap,omitempty"` Time *float32 `json:"Time,omitempty"` Lap *float32 `json:"Lap,omitempty"` PlayerEntries []PlayerEntry `json:"PlayerEntries,omitempty"` }
func NewReplay() *Replay
NewReplay instantiates a new Replay 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 NewReplayWithDefaults() *Replay
NewReplayWithDefaults instantiates a new Replay 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 (o *Replay) GetGameMap() float32
GetGameMap returns the GameMap field value if set, zero value otherwise.
func (o *Replay) GetGameMapOk() (*float32, bool)
GetGameMapOk returns a tuple with the GameMap field value if set, nil otherwise and a boolean to check if the value has been set.
func (o *Replay) GetLap() float32
GetLap returns the Lap field value if set, zero value otherwise.
func (o *Replay) GetLapOk() (*float32, bool)
GetLapOk returns a tuple with the Lap field value if set, nil otherwise and a boolean to check if the value has been set.
func (o *Replay) GetPlayerEntries() []PlayerEntry
GetPlayerEntries returns the PlayerEntries field value if set, zero value otherwise.
func (o *Replay) GetPlayerEntriesOk() ([]PlayerEntry, bool)
GetPlayerEntriesOk returns a tuple with the PlayerEntries field value if set, nil otherwise and a boolean to check if the value has been set.
func (o *Replay) GetTime() float32
GetTime returns the Time field value if set, zero value otherwise.
func (o *Replay) GetTimeOk() (*float32, bool)
GetTimeOk returns a tuple with the Time field value if set, nil otherwise and a boolean to check if the value has been set.
func (o *Replay) GetTitle() string
GetTitle returns the Title field value if set, zero value otherwise.
func (o *Replay) GetTitleOk() (*string, bool)
GetTitleOk returns a tuple with the Title field value if set, nil otherwise and a boolean to check if the value has been set.
func (o *Replay) HasGameMap() bool
HasGameMap returns a boolean if a field has been set.
func (o *Replay) HasLap() bool
HasLap returns a boolean if a field has been set.
func (o *Replay) HasPlayerEntries() bool
HasPlayerEntries returns a boolean if a field has been set.
func (o *Replay) HasTime() bool
HasTime returns a boolean if a field has been set.
func (o *Replay) HasTitle() bool
HasTitle returns a boolean if a field has been set.
func (o Replay) MarshalJSON() ([]byte, error)
func (o *Replay) SetGameMap(v float32)
SetGameMap gets a reference to the given float32 and assigns it to the GameMap field.
func (o *Replay) SetLap(v float32)
SetLap gets a reference to the given float32 and assigns it to the Lap field.
func (o *Replay) SetPlayerEntries(v []PlayerEntry)
SetPlayerEntries gets a reference to the given []PlayerEntry and assigns it to the PlayerEntries field.
func (o *Replay) SetTime(v float32)
SetTime gets a reference to the given float32 and assigns it to the Time field.
func (o *Replay) SetTitle(v string)
SetTitle gets a reference to the given string and assigns it to the Title field.
ServerConfiguration stores the information about a server
type ServerConfiguration struct { URL string Description string Variables map[string]ServerVariable }
ServerConfigurations stores multiple ServerConfiguration items
type ServerConfigurations []ServerConfiguration
func (sc ServerConfigurations) URL(index int, variables map[string]string) (string, error)
URL formats template on a index using given variables
ServerVariable stores the information about a server variable
type ServerVariable struct { Description string DefaultValue string EnumValues []string }