abe

package
v2.5.1-0...-d02024d Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2021 License: BSD-3-Clause Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ContextOAuth2 takes a 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")

	// ContextAPIKey takes an APIKey as authentication for the request
	ContextAPIKey = contextKey("apikey")
)

Functions

func CacheExpires

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

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

Types

type ABitOfEverything

type ABitOfEverything struct {
	SingleNested *ABitOfEverythingNested  `json:"singleNested,omitempty"`
	Nested       []ABitOfEverythingNested `json:"nested,omitempty"`
	// Float value field
	FloatValue               float32                           `json:"floatValue"`
	DoubleValue              float64                           `json:"doubleValue"`
	Int64Value               string                            `json:"int64Value"`
	Uint64Value              string                            `json:"uint64Value,omitempty"`
	Int32Value               int32                             `json:"int32Value,omitempty"`
	Fixed64Value             string                            `json:"fixed64Value,omitempty"`
	Fixed32Value             int64                             `json:"fixed32Value,omitempty"`
	BoolValue                bool                              `json:"boolValue,omitempty"`
	StringValue              string                            `json:"stringValue,omitempty"`
	BytesValue               string                            `json:"bytesValue,omitempty"`
	Uint32Value              int64                             `json:"uint32Value,omitempty"`
	EnumValue                *ExamplepbNumericEnum             `json:"enumValue,omitempty"`
	PathEnumValue            *PathenumPathEnum                 `json:"pathEnumValue,omitempty"`
	NestedPathEnumValue      *MessagePathEnumNestedPathEnum    `json:"nestedPathEnumValue,omitempty"`
	Sfixed32Value            int32                             `json:"sfixed32Value,omitempty"`
	Sfixed64Value            string                            `json:"sfixed64Value,omitempty"`
	Sint32Value              int32                             `json:"sint32Value,omitempty"`
	Sint64Value              string                            `json:"sint64Value,omitempty"`
	RepeatedStringValue      []string                          `json:"repeatedStringValue,omitempty"`
	OneofEmpty               *interface{}                      `json:"oneofEmpty,omitempty"`
	OneofString              string                            `json:"oneofString,omitempty"`
	MapValue                 map[string]ExamplepbNumericEnum   `json:"mapValue,omitempty"`
	MappedStringValue        map[string]string                 `json:"mappedStringValue,omitempty"`
	MappedNestedValue        map[string]ABitOfEverythingNested `json:"mappedNestedValue,omitempty"`
	NonConventionalNameValue string                            `json:"nonConventionalNameValue,omitempty"`
	TimestampValue           time.Time                         `json:"timestampValue,omitempty"`
	RepeatedEnumValue        []ExamplepbNumericEnum            `json:"repeatedEnumValue,omitempty"`
	// Repeated numeric enum description.
	RepeatedEnumAnnotation []ExamplepbNumericEnum `json:"repeatedEnumAnnotation,omitempty"`
	// Numeric enum description.
	EnumValueAnnotation *ExamplepbNumericEnum `json:"enumValueAnnotation,omitempty"`
	// Repeated string description.
	RepeatedStringAnnotation []string `json:"repeatedStringAnnotation,omitempty"`
	// Repeated nested object description.
	RepeatedNestedAnnotation []ABitOfEverythingNested `json:"repeatedNestedAnnotation,omitempty"`
	// Nested object description.
	NestedAnnotation                           *ABitOfEverythingNested `json:"nestedAnnotation,omitempty"`
	Int64OverrideType                          int64                   `json:"int64OverrideType,omitempty"`
	RequiredStringViaFieldBehaviorAnnotation   string                  `json:"requiredStringViaFieldBehaviorAnnotation"`
	OutputOnlyStringViaFieldBehaviorAnnotation string                  `json:"outputOnlyStringViaFieldBehaviorAnnotation,omitempty"`
	OptionalStringValue                        string                  `json:"optionalStringValue,omitempty"`
}

Intentionaly complicated message type to cover many features of Protobuf.

type ABitOfEverythingNested

type ABitOfEverythingNested struct {
	// name is nested field.
	Name   string `json:"name,omitempty"`
	Amount int64  `json:"amount,omitempty"`
	// DeepEnum description.
	Ok *NestedDeepEnum `json:"ok,omitempty"`
}

Nested is nested type.

type ABitOfEverythingServiceApiService

type ABitOfEverythingServiceApiService service

func (*ABitOfEverythingServiceApiService) ABitOfEverythingServiceCheckExternalNestedPathEnum

func (a *ABitOfEverythingServiceApiService) ABitOfEverythingServiceCheckExternalNestedPathEnum(ctx context.Context, value string) (interface{}, *http.Response, error)

ABitOfEverythingServiceApiService

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

@return interface{}

func (*ABitOfEverythingServiceApiService) ABitOfEverythingServiceCheckGetQueryParams

func (a *ABitOfEverythingServiceApiService) ABitOfEverythingServiceCheckGetQueryParams(ctx context.Context, singleNestedName string, floatValue float32, requiredStringViaFieldBehaviorAnnotation string, localVarOptionals *ABitOfEverythingServiceCheckGetQueryParamsOpts) (ExamplepbABitOfEverything, *http.Response, error)

func (*ABitOfEverythingServiceApiService) ABitOfEverythingServiceCheckNestedEnumGetQueryParams

func (a *ABitOfEverythingServiceApiService) ABitOfEverythingServiceCheckNestedEnumGetQueryParams(ctx context.Context, singleNestedOk string, floatValue float32, requiredStringViaFieldBehaviorAnnotation string, localVarOptionals *ABitOfEverythingServiceCheckNestedEnumGetQueryParamsOpts) (ExamplepbABitOfEverything, *http.Response, error)

func (*ABitOfEverythingServiceApiService) ABitOfEverythingServiceCheckPostQueryParams

func (a *ABitOfEverythingServiceApiService) ABitOfEverythingServiceCheckPostQueryParams(ctx context.Context, stringValue string, body ABitOfEverythingNested, floatValue float32, requiredStringViaFieldBehaviorAnnotation string, localVarOptionals *ABitOfEverythingServiceCheckPostQueryParamsOpts) (ExamplepbABitOfEverything, *http.Response, error)

func (*ABitOfEverythingServiceApiService) ABitOfEverythingServiceCheckStatus

func (a *ABitOfEverythingServiceApiService) ABitOfEverythingServiceCheckStatus(ctx context.Context) (ExamplepbCheckStatusResponse, *http.Response, error)

ABitOfEverythingServiceApiService

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

@return ExamplepbCheckStatusResponse

func (*ABitOfEverythingServiceApiService) ABitOfEverythingServiceCreate

func (a *ABitOfEverythingServiceApiService) ABitOfEverythingServiceCreate(ctx context.Context, floatValue float32, doubleValue float64, int64Value string, uint64Value string, int32Value int32, fixed64Value string, fixed32Value int64, boolValue bool, stringValue string, uint32Value int64, sfixed32Value int32, sfixed64Value string, sint32Value int32, sint64Value string, nonConventionalNameValue string, enumValue string, pathEnumValue string, nestedPathEnumValue string, enumValueAnnotation string) (ExamplepbABitOfEverything, *http.Response, error)

ABitOfEverythingServiceApiService Create a new ABitOfEverything This API creates a new ABitOfEverything

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param floatValue Float value field
  • @param doubleValue
  • @param int64Value
  • @param uint64Value
  • @param int32Value
  • @param fixed64Value
  • @param fixed32Value
  • @param boolValue
  • @param stringValue
  • @param uint32Value
  • @param sfixed32Value
  • @param sfixed64Value
  • @param sint32Value
  • @param sint64Value
  • @param nonConventionalNameValue
  • @param enumValue
  • @param pathEnumValue
  • @param nestedPathEnumValue
  • @param enumValueAnnotation Numeric enum description.

@return ExamplepbABitOfEverything

func (*ABitOfEverythingServiceApiService) ABitOfEverythingServiceCreateBody

ABitOfEverythingServiceApiService

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

@return ExamplepbABitOfEverything

func (*ABitOfEverythingServiceApiService) ABitOfEverythingServiceCreateBook

func (a *ABitOfEverythingServiceApiService) ABitOfEverythingServiceCreateBook(ctx context.Context, parent string, body ExamplepbBook, localVarOptionals *ABitOfEverythingServiceCreateBookOpts) (ExamplepbBook, *http.Response, error)

func (*ABitOfEverythingServiceApiService) ABitOfEverythingServiceDeepPathEcho

func (a *ABitOfEverythingServiceApiService) ABitOfEverythingServiceDeepPathEcho(ctx context.Context, singleNestedName string, body ExamplepbABitOfEverything) (ExamplepbABitOfEverything, *http.Response, error)

ABitOfEverythingServiceApiService

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param singleNestedName name is nested field.
  • @param body

@return ExamplepbABitOfEverything

func (*ABitOfEverythingServiceApiService) ABitOfEverythingServiceDelete

func (a *ABitOfEverythingServiceApiService) ABitOfEverythingServiceDelete(ctx context.Context, uuid string) (interface{}, *http.Response, error)

ABitOfEverythingServiceApiService

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

@return interface{}

func (*ABitOfEverythingServiceApiService) ABitOfEverythingServiceErrorWithDetails

func (a *ABitOfEverythingServiceApiService) ABitOfEverythingServiceErrorWithDetails(ctx context.Context) (interface{}, *http.Response, error)

ABitOfEverythingServiceApiService

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

@return interface{}

func (*ABitOfEverythingServiceApiService) ABitOfEverythingServiceGetMessageWithBody

func (a *ABitOfEverythingServiceApiService) ABitOfEverythingServiceGetMessageWithBody(ctx context.Context, id string, body ExamplepbBody) (interface{}, *http.Response, error)

ABitOfEverythingServiceApiService

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

@return interface{}

func (*ABitOfEverythingServiceApiService) ABitOfEverythingServiceGetQuery

func (a *ABitOfEverythingServiceApiService) ABitOfEverythingServiceGetQuery(ctx context.Context, uuid string, floatValue float32, requiredStringViaFieldBehaviorAnnotation string, localVarOptionals *ABitOfEverythingServiceGetQueryOpts) (interface{}, *http.Response, error)

func (*ABitOfEverythingServiceApiService) ABitOfEverythingServiceGetRepeatedQuery

func (a *ABitOfEverythingServiceApiService) ABitOfEverythingServiceGetRepeatedQuery(ctx context.Context, pathRepeatedFloatValue []float32, pathRepeatedDoubleValue []float64, pathRepeatedInt64Value []string, pathRepeatedUint64Value []string, pathRepeatedInt32Value []int32, pathRepeatedFixed64Value []string, pathRepeatedFixed32Value []int64, pathRepeatedBoolValue []bool, pathRepeatedStringValue []string, pathRepeatedBytesValue []string, pathRepeatedUint32Value []int64, pathRepeatedEnumValue []string, pathRepeatedSfixed32Value []int32, pathRepeatedSfixed64Value []string, pathRepeatedSint32Value []int32, pathRepeatedSint64Value []string) (ExamplepbABitOfEverythingRepeated, *http.Response, error)

ABitOfEverythingServiceApiService

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param pathRepeatedFloatValue repeated values. they are comma-separated in path
  • @param pathRepeatedDoubleValue
  • @param pathRepeatedInt64Value
  • @param pathRepeatedUint64Value
  • @param pathRepeatedInt32Value
  • @param pathRepeatedFixed64Value
  • @param pathRepeatedFixed32Value
  • @param pathRepeatedBoolValue
  • @param pathRepeatedStringValue
  • @param pathRepeatedBytesValue
  • @param pathRepeatedUint32Value
  • @param pathRepeatedEnumValue
  • @param pathRepeatedSfixed32Value
  • @param pathRepeatedSfixed64Value
  • @param pathRepeatedSint32Value
  • @param pathRepeatedSint64Value

@return ExamplepbABitOfEverythingRepeated

func (*ABitOfEverythingServiceApiService) ABitOfEverythingServiceLookup

func (a *ABitOfEverythingServiceApiService) ABitOfEverythingServiceLookup(ctx context.Context, uuid string) (ExamplepbABitOfEverything, *http.Response, error)

ABitOfEverythingServiceApiService

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

@return ExamplepbABitOfEverything

func (*ABitOfEverythingServiceApiService) ABitOfEverythingServiceOverwriteResponseContentType

func (a *ABitOfEverythingServiceApiService) ABitOfEverythingServiceOverwriteResponseContentType(ctx context.Context) (string, *http.Response, error)

ABitOfEverythingServiceApiService

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

@return string

func (*ABitOfEverythingServiceApiService) ABitOfEverythingServicePostWithEmptyBody

func (a *ABitOfEverythingServiceApiService) ABitOfEverythingServicePostWithEmptyBody(ctx context.Context, name string, body interface{}) (interface{}, *http.Response, error)

ABitOfEverythingServiceApiService

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

@return interface{}

func (*ABitOfEverythingServiceApiService) ABitOfEverythingServiceTimeout

func (a *ABitOfEverythingServiceApiService) ABitOfEverythingServiceTimeout(ctx context.Context) (interface{}, *http.Response, error)

ABitOfEverythingServiceApiService

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

@return interface{}

func (*ABitOfEverythingServiceApiService) ABitOfEverythingServiceUpdate

func (a *ABitOfEverythingServiceApiService) ABitOfEverythingServiceUpdate(ctx context.Context, uuid string, body ABitOfEverything) (interface{}, *http.Response, error)

ABitOfEverythingServiceApiService

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

@return interface{}

func (*ABitOfEverythingServiceApiService) ABitOfEverythingServiceUpdateBook

func (a *ABitOfEverythingServiceApiService) ABitOfEverythingServiceUpdateBook(ctx context.Context, bookName string, body ExamplepbBook, localVarOptionals *ABitOfEverythingServiceUpdateBookOpts) (ExamplepbBook, *http.Response, error)

func (*ABitOfEverythingServiceApiService) ABitOfEverythingServiceUpdateV2

func (a *ABitOfEverythingServiceApiService) ABitOfEverythingServiceUpdateV2(ctx context.Context, abeUuid string, body ExamplepbABitOfEverything, localVarOptionals *ABitOfEverythingServiceUpdateV2Opts) (interface{}, *http.Response, error)

func (*ABitOfEverythingServiceApiService) ABitOfEverythingServiceUpdateV22

func (a *ABitOfEverythingServiceApiService) ABitOfEverythingServiceUpdateV22(ctx context.Context, abeUuid string, body ExamplepbABitOfEverything, localVarOptionals *ABitOfEverythingServiceUpdateV22Opts) (interface{}, *http.Response, error)

func (*ABitOfEverythingServiceApiService) ABitOfEverythingServiceUpdateV23

func (a *ABitOfEverythingServiceApiService) ABitOfEverythingServiceUpdateV23(ctx context.Context, abeUuid string, body ExamplepbUpdateV2Request) (interface{}, *http.Response, error)

ABitOfEverythingServiceApiService

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

@return interface{}

type ABitOfEverythingServiceCheckGetQueryParamsOpts

type ABitOfEverythingServiceCheckGetQueryParamsOpts struct {
	SingleNestedAmount                         optional.Int64
	SingleNestedOk                             optional.String
	Uuid                                       optional.String
	DoubleValue                                optional.Float64
	Int64Value                                 optional.String
	Uint64Value                                optional.String
	Int32Value                                 optional.Int32
	Fixed64Value                               optional.String
	Fixed32Value                               optional.Int64
	BoolValue                                  optional.Bool
	StringValue                                optional.String
	BytesValue                                 optional.String
	Uint32Value                                optional.Int64
	EnumValue                                  optional.String
	PathEnumValue                              optional.String
	NestedPathEnumValue                        optional.String
	Sfixed32Value                              optional.Int32
	Sfixed64Value                              optional.String
	Sint32Value                                optional.Int32
	Sint64Value                                optional.String
	RepeatedStringValue                        optional.Interface
	OneofString                                optional.String
	NonConventionalNameValue                   optional.String
	TimestampValue                             optional.Time
	RepeatedEnumValue                          optional.Interface
	RepeatedEnumAnnotation                     optional.Interface
	EnumValueAnnotation                        optional.String
	RepeatedStringAnnotation                   optional.Interface
	NestedAnnotationAmount                     optional.Int64
	NestedAnnotationOk                         optional.String
	Int64OverrideType                          optional.Int64
	OutputOnlyStringViaFieldBehaviorAnnotation optional.String
	OptionalStringValue                        optional.String
}

type ABitOfEverythingServiceCheckNestedEnumGetQueryParamsOpts

type ABitOfEverythingServiceCheckNestedEnumGetQueryParamsOpts struct {
	SingleNestedName                           optional.String
	SingleNestedAmount                         optional.Int64
	Uuid                                       optional.String
	DoubleValue                                optional.Float64
	Int64Value                                 optional.String
	Uint64Value                                optional.String
	Int32Value                                 optional.Int32
	Fixed64Value                               optional.String
	Fixed32Value                               optional.Int64
	BoolValue                                  optional.Bool
	StringValue                                optional.String
	BytesValue                                 optional.String
	Uint32Value                                optional.Int64
	EnumValue                                  optional.String
	PathEnumValue                              optional.String
	NestedPathEnumValue                        optional.String
	Sfixed32Value                              optional.Int32
	Sfixed64Value                              optional.String
	Sint32Value                                optional.Int32
	Sint64Value                                optional.String
	RepeatedStringValue                        optional.Interface
	OneofString                                optional.String
	NonConventionalNameValue                   optional.String
	TimestampValue                             optional.Time
	RepeatedEnumValue                          optional.Interface
	RepeatedEnumAnnotation                     optional.Interface
	EnumValueAnnotation                        optional.String
	RepeatedStringAnnotation                   optional.Interface
	NestedAnnotationName                       optional.String
	NestedAnnotationAmount                     optional.Int64
	Int64OverrideType                          optional.Int64
	OutputOnlyStringViaFieldBehaviorAnnotation optional.String
	OptionalStringValue                        optional.String
}

type ABitOfEverythingServiceCheckPostQueryParamsOpts

type ABitOfEverythingServiceCheckPostQueryParamsOpts struct {
	Uuid                                       optional.String
	DoubleValue                                optional.Float64
	Int64Value                                 optional.String
	Uint64Value                                optional.String
	Int32Value                                 optional.Int32
	Fixed64Value                               optional.String
	Fixed32Value                               optional.Int64
	BoolValue                                  optional.Bool
	BytesValue                                 optional.String
	Uint32Value                                optional.Int64
	EnumValue                                  optional.String
	PathEnumValue                              optional.String
	NestedPathEnumValue                        optional.String
	Sfixed32Value                              optional.Int32
	Sfixed64Value                              optional.String
	Sint32Value                                optional.Int32
	Sint64Value                                optional.String
	RepeatedStringValue                        optional.Interface
	OneofString                                optional.String
	NonConventionalNameValue                   optional.String
	TimestampValue                             optional.Time
	RepeatedEnumValue                          optional.Interface
	RepeatedEnumAnnotation                     optional.Interface
	EnumValueAnnotation                        optional.String
	RepeatedStringAnnotation                   optional.Interface
	NestedAnnotationName                       optional.String
	NestedAnnotationAmount                     optional.Int64
	NestedAnnotationOk                         optional.String
	Int64OverrideType                          optional.Int64
	OutputOnlyStringViaFieldBehaviorAnnotation optional.String
	OptionalStringValue                        optional.String
}

type ABitOfEverythingServiceCreateBookOpts

type ABitOfEverythingServiceCreateBookOpts struct {
	BookId optional.String
}

type ABitOfEverythingServiceEcho3Opts

type ABitOfEverythingServiceEcho3Opts struct {
	Value optional.String
}

type ABitOfEverythingServiceGetQueryOpts

type ABitOfEverythingServiceGetQueryOpts struct {
	SingleNestedName                           optional.String
	SingleNestedAmount                         optional.Int64
	SingleNestedOk                             optional.String
	DoubleValue                                optional.Float64
	Int64Value                                 optional.String
	Uint64Value                                optional.String
	Int32Value                                 optional.Int32
	Fixed64Value                               optional.String
	Fixed32Value                               optional.Int64
	BoolValue                                  optional.Bool
	StringValue                                optional.String
	BytesValue                                 optional.String
	Uint32Value                                optional.Int64
	EnumValue                                  optional.String
	PathEnumValue                              optional.String
	NestedPathEnumValue                        optional.String
	Sfixed32Value                              optional.Int32
	Sfixed64Value                              optional.String
	Sint32Value                                optional.Int32
	Sint64Value                                optional.String
	RepeatedStringValue                        optional.Interface
	OneofString                                optional.String
	NonConventionalNameValue                   optional.String
	TimestampValue                             optional.Time
	RepeatedEnumValue                          optional.Interface
	RepeatedEnumAnnotation                     optional.Interface
	EnumValueAnnotation                        optional.String
	RepeatedStringAnnotation                   optional.Interface
	NestedAnnotationName                       optional.String
	NestedAnnotationAmount                     optional.Int64
	NestedAnnotationOk                         optional.String
	Int64OverrideType                          optional.Int64
	OutputOnlyStringViaFieldBehaviorAnnotation optional.String
	OptionalStringValue                        optional.String
}

type ABitOfEverythingServiceUpdateBookOpts

type ABitOfEverythingServiceUpdateBookOpts struct {
	UpdateMask   optional.String
	AllowMissing optional.Bool
}

type ABitOfEverythingServiceUpdateV22Opts

type ABitOfEverythingServiceUpdateV22Opts struct {
	UpdateMask optional.String
}

type ABitOfEverythingServiceUpdateV2Opts

type ABitOfEverythingServiceUpdateV2Opts struct {
	UpdateMask optional.String
}

type APIClient

type APIClient struct {
	ABitOfEverythingServiceApi *ABitOfEverythingServiceApiService

	CamelCaseServiceNameApi *CamelCaseServiceNameApiService

	EchoRpcApi *EchoRpcApiService
	// contains filtered or unexported fields
}

APIClient manages communication with the A Bit of Everything API v1.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.

func (*APIClient) ChangeBasePath

func (c *APIClient) ChangeBasePath(path string)

Change base path to allow switching to mocks

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 swagger 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

func NewAPIResponse(r *http.Response) *APIResponse

func NewAPIResponseWithError

func NewAPIResponseWithError(errorMessage string) *APIResponse

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 CamelCaseServiceNameApiService

type CamelCaseServiceNameApiService service

func (*CamelCaseServiceNameApiService) CamelCaseServiceNameEmpty

func (a *CamelCaseServiceNameApiService) CamelCaseServiceNameEmpty(ctx context.Context) (interface{}, *http.Response, error)

CamelCaseServiceNameApiService

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

@return interface{}

type Configuration

type Configuration struct {
	BasePath      string            `json:"basePath,omitempty"`
	Host          string            `json:"host,omitempty"`
	Scheme        string            `json:"scheme,omitempty"`
	DefaultHeader map[string]string `json:"defaultHeader,omitempty"`
	UserAgent     string            `json:"userAgent,omitempty"`
	HTTPClient    *http.Client
}

func NewConfiguration

func NewConfiguration() *Configuration

func (*Configuration) AddDefaultHeader

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

type EchoRpcApiService

type EchoRpcApiService service

func (*EchoRpcApiService) ABitOfEverythingServiceEcho

func (a *EchoRpcApiService) ABitOfEverythingServiceEcho(ctx context.Context, value string) (SubStringMessage, *http.Response, error)

EchoRpcApiService Summary: Echo rpc Description Echo

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

@return SubStringMessage

func (*EchoRpcApiService) ABitOfEverythingServiceEcho2

func (a *EchoRpcApiService) ABitOfEverythingServiceEcho2(ctx context.Context, body string) (SubStringMessage, *http.Response, error)

EchoRpcApiService Summary: Echo rpc Description Echo

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

@return SubStringMessage

func (*EchoRpcApiService) ABitOfEverythingServiceEcho3

func (a *EchoRpcApiService) ABitOfEverythingServiceEcho3(ctx context.Context, localVarOptionals *ABitOfEverythingServiceEcho3Opts) (SubStringMessage, *http.Response, error)

type ExamplepbABitOfEverything

type ExamplepbABitOfEverything struct {
	SingleNested *ABitOfEverythingNested  `json:"singleNested,omitempty"`
	Uuid         string                   `json:"uuid"`
	Nested       []ABitOfEverythingNested `json:"nested,omitempty"`
	// Float value field
	FloatValue               float32                           `json:"floatValue"`
	DoubleValue              float64                           `json:"doubleValue"`
	Int64Value               string                            `json:"int64Value"`
	Uint64Value              string                            `json:"uint64Value,omitempty"`
	Int32Value               int32                             `json:"int32Value,omitempty"`
	Fixed64Value             string                            `json:"fixed64Value,omitempty"`
	Fixed32Value             int64                             `json:"fixed32Value,omitempty"`
	BoolValue                bool                              `json:"boolValue,omitempty"`
	StringValue              string                            `json:"stringValue,omitempty"`
	BytesValue               string                            `json:"bytesValue,omitempty"`
	Uint32Value              int64                             `json:"uint32Value,omitempty"`
	EnumValue                *ExamplepbNumericEnum             `json:"enumValue,omitempty"`
	PathEnumValue            *PathenumPathEnum                 `json:"pathEnumValue,omitempty"`
	NestedPathEnumValue      *MessagePathEnumNestedPathEnum    `json:"nestedPathEnumValue,omitempty"`
	Sfixed32Value            int32                             `json:"sfixed32Value,omitempty"`
	Sfixed64Value            string                            `json:"sfixed64Value,omitempty"`
	Sint32Value              int32                             `json:"sint32Value,omitempty"`
	Sint64Value              string                            `json:"sint64Value,omitempty"`
	RepeatedStringValue      []string                          `json:"repeatedStringValue,omitempty"`
	OneofEmpty               *interface{}                      `json:"oneofEmpty,omitempty"`
	OneofString              string                            `json:"oneofString,omitempty"`
	MapValue                 map[string]ExamplepbNumericEnum   `json:"mapValue,omitempty"`
	MappedStringValue        map[string]string                 `json:"mappedStringValue,omitempty"`
	MappedNestedValue        map[string]ABitOfEverythingNested `json:"mappedNestedValue,omitempty"`
	NonConventionalNameValue string                            `json:"nonConventionalNameValue,omitempty"`
	TimestampValue           time.Time                         `json:"timestampValue,omitempty"`
	RepeatedEnumValue        []ExamplepbNumericEnum            `json:"repeatedEnumValue,omitempty"`
	// Repeated numeric enum description.
	RepeatedEnumAnnotation []ExamplepbNumericEnum `json:"repeatedEnumAnnotation,omitempty"`
	// Numeric enum description.
	EnumValueAnnotation *ExamplepbNumericEnum `json:"enumValueAnnotation,omitempty"`
	// Repeated string description.
	RepeatedStringAnnotation []string `json:"repeatedStringAnnotation,omitempty"`
	// Repeated nested object description.
	RepeatedNestedAnnotation []ABitOfEverythingNested `json:"repeatedNestedAnnotation,omitempty"`
	// Nested object description.
	NestedAnnotation                           *ABitOfEverythingNested `json:"nestedAnnotation,omitempty"`
	Int64OverrideType                          int64                   `json:"int64OverrideType,omitempty"`
	RequiredStringViaFieldBehaviorAnnotation   string                  `json:"requiredStringViaFieldBehaviorAnnotation"`
	OutputOnlyStringViaFieldBehaviorAnnotation string                  `json:"outputOnlyStringViaFieldBehaviorAnnotation,omitempty"`
	OptionalStringValue                        string                  `json:"optionalStringValue,omitempty"`
}

Intentionaly complicated message type to cover many features of Protobuf.

type ExamplepbABitOfEverythingRepeated

type ExamplepbABitOfEverythingRepeated struct {
	PathRepeatedFloatValue    []float32              `json:"pathRepeatedFloatValue,omitempty"`
	PathRepeatedDoubleValue   []float64              `json:"pathRepeatedDoubleValue,omitempty"`
	PathRepeatedInt64Value    []string               `json:"pathRepeatedInt64Value,omitempty"`
	PathRepeatedUint64Value   []string               `json:"pathRepeatedUint64Value,omitempty"`
	PathRepeatedInt32Value    []int32                `json:"pathRepeatedInt32Value,omitempty"`
	PathRepeatedFixed64Value  []string               `json:"pathRepeatedFixed64Value,omitempty"`
	PathRepeatedFixed32Value  []int64                `json:"pathRepeatedFixed32Value,omitempty"`
	PathRepeatedBoolValue     []bool                 `json:"pathRepeatedBoolValue,omitempty"`
	PathRepeatedStringValue   []string               `json:"pathRepeatedStringValue,omitempty"`
	PathRepeatedBytesValue    []string               `json:"pathRepeatedBytesValue,omitempty"`
	PathRepeatedUint32Value   []int64                `json:"pathRepeatedUint32Value,omitempty"`
	PathRepeatedEnumValue     []ExamplepbNumericEnum `json:"pathRepeatedEnumValue,omitempty"`
	PathRepeatedSfixed32Value []int32                `json:"pathRepeatedSfixed32Value,omitempty"`
	PathRepeatedSfixed64Value []string               `json:"pathRepeatedSfixed64Value,omitempty"`
	PathRepeatedSint32Value   []int32                `json:"pathRepeatedSint32Value,omitempty"`
	PathRepeatedSint64Value   []string               `json:"pathRepeatedSint64Value,omitempty"`
}

type ExamplepbBody

type ExamplepbBody struct {
	Name string `json:"name,omitempty"`
}

type ExamplepbBook

type ExamplepbBook struct {
	// The resource name of the book.  Format: `publishers/{publisher}/books/{book}`  Example: `publishers/1257894000000000000/books/my-book`
	Name string `json:"name,omitempty"`
	// Output only. The book's ID.
	Id string `json:"id,omitempty"`
	// Output only. Creation time of the book.
	CreateTime time.Time `json:"createTime,omitempty"`
}

An example resource type from AIP-123 used to test the behavior described in the CreateBookRequest message. See: https://google.aip.dev/123

type ExamplepbCheckStatusResponse

type ExamplepbCheckStatusResponse struct {
	Status *RpcStatus `json:"status,omitempty"`
}

type ExamplepbErrorObject

type ExamplepbErrorObject struct {
	// Response code
	Code int32 `json:"code,omitempty"`
	// Response message
	Message string `json:"message,omitempty"`
}

type ExamplepbErrorResponse

type ExamplepbErrorResponse struct {
	// Unique event identifier for server requests
	CorrelationId string                `json:"correlationId,omitempty"`
	Error_        *ExamplepbErrorObject `json:"error,omitempty"`
}

type ExamplepbNumericEnum

type ExamplepbNumericEnum string

ExamplepbNumericEnum : NumericEnum is one or zero. - ZERO: ZERO means 0 - ONE: ONE means 1

const (
	ZERO_ExamplepbNumericEnum ExamplepbNumericEnum = "ZERO"
	ONE_ExamplepbNumericEnum  ExamplepbNumericEnum = "ONE"
)

List of examplepbNumericEnum

func (ExamplepbNumericEnum) String

func (e ExamplepbNumericEnum) String() string

String returns a string representation of "NumericEnum"

func (ExamplepbNumericEnum) UnmarshalJSON

func (e ExamplepbNumericEnum) UnmarshalJSON(b []byte) error

UnmarshalJSON does a no-op unmarshal to ExamplepbNumericEnum. It just validates that the input is sane.

type ExamplepbUpdateV2Request

type ExamplepbUpdateV2Request struct {
	Abe *ExamplepbABitOfEverything `json:"abe,omitempty"`
	// The paths to update.
	UpdateMask string `json:"updateMask,omitempty"`
}

type GenericSwaggerError

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

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

func (GenericSwaggerError) Body

func (e GenericSwaggerError) Body() []byte

Body returns the raw bytes of the response

func (GenericSwaggerError) Error

func (e GenericSwaggerError) Error() string

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

func (GenericSwaggerError) Model

func (e GenericSwaggerError) Model() interface{}

Model returns the unpacked model of the error

type MessagePathEnumNestedPathEnum

type MessagePathEnumNestedPathEnum string
const (
	GHI_MessagePathEnumNestedPathEnum MessagePathEnumNestedPathEnum = "GHI"
	JKL_MessagePathEnumNestedPathEnum MessagePathEnumNestedPathEnum = "JKL"
)

List of MessagePathEnumNestedPathEnum

func (MessagePathEnumNestedPathEnum) String

String returns a string representation of "MessagePathEnum"

func (MessagePathEnumNestedPathEnum) UnmarshalJSON

func (e MessagePathEnumNestedPathEnum) UnmarshalJSON(b []byte) error

UnmarshalJSON does a no-op unmarshal to MessagePathEnumNestedPathEnum. It just validates that the input is sane.

type NestedDeepEnum

type NestedDeepEnum string

NestedDeepEnum : DeepEnum is one or zero. - FALSE: FALSE is false. - TRUE: TRUE is true.

const (
	FALSE_NestedDeepEnum NestedDeepEnum = "FALSE"
	TRUE_NestedDeepEnum  NestedDeepEnum = "TRUE"
)

List of NestedDeepEnum

type PathenumPathEnum

type PathenumPathEnum string
const (
	ABC_PathenumPathEnum PathenumPathEnum = "ABC"
	DEF_PathenumPathEnum PathenumPathEnum = "DEF"
)

List of pathenumPathEnum

func (PathenumPathEnum) String

func (e PathenumPathEnum) String() string

String returns a string representation of "PathEnum"

func (PathenumPathEnum) UnmarshalJSON

func (e PathenumPathEnum) UnmarshalJSON(b []byte) error

UnmarshalJSON does a no-op unmarshal to PathenumPathEnum. It just validates that the input is sane.

type ProtobufAny

type ProtobufAny struct {
	// A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one \"/\" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading \".\" is not accepted).  In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows:  * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][]   value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the   URL, or have them precompiled into a binary to avoid any   lookup. Therefore, binary compatibility needs to be preserved   on changes to types. (Use versioned type names to manage   breaking changes.)  Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com.  Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics.
	TypeUrl string `json:"typeUrl,omitempty"`
	// Must be a valid serialized protocol buffer of the above specified type.
	Value string `json:"value,omitempty"`
}

`Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example \"foo.bar.com/x/y.z\" will yield type name \"y.z\". JSON ==== The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { \"@type\": \"type.googleapis.com/google.profile.Person\", \"firstName\": <string>, \"lastName\": <string> } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { \"@type\": \"type.googleapis.com/google.protobuf.Duration\", \"value\": \"1.212s\" }

type RpcStatus

type RpcStatus struct {
	// The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].
	Code int32 `json:"code,omitempty"`
	// A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.
	Message string `json:"message,omitempty"`
	// A list of messages that carry the error details.  There is a common set of message types for APIs to use.
	Details []ProtobufAny `json:"details,omitempty"`
}

The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).

type SubStringMessage

type SubStringMessage struct {
	Value string `json:"value,omitempty"`
}

Jump to

Keyboard shortcuts

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