Documentation ¶
Index ¶
- Variables
- func RegisterABitOfEverythingServiceServer(router gin.IRouter, s ABitOfEverythingServiceServer)
- func RegisterCamelCaseServiceNameServer(router gin.IRouter, s CamelCaseServiceNameServer)
- type ABitOfEverything
- type ABitOfEverythingRepeated
- type ABitOfEverythingServiceClient
- type ABitOfEverythingServiceServer
- type ABitOfEverything_MapValueEntry
- type ABitOfEverything_MappedNestedValueEntry
- type ABitOfEverything_MappedStringValueEntry
- type ABitOfEverything_Nested
- type ABitOfEverything_Nested_DeepEnum
- type Body
- type Book
- type CamelCaseServiceNameClient
- type CamelCaseServiceNameServer
- type CheckStatusResponse
- type CreateBookRequest
- type DefaultABitOfEverythingServiceDecorator
- func (s *DefaultABitOfEverythingServiceDecorator) CheckExternalNestedPathEnum(ctx *gin.Context)
- func (s *DefaultABitOfEverythingServiceDecorator) CheckExternalPathEnum(ctx *gin.Context)
- func (s *DefaultABitOfEverythingServiceDecorator) CheckGetQueryParams(ctx *gin.Context)
- func (s *DefaultABitOfEverythingServiceDecorator) CheckNestedEnumGetQueryParams(ctx *gin.Context)
- func (s *DefaultABitOfEverythingServiceDecorator) CheckPostQueryParams(ctx *gin.Context)
- func (s *DefaultABitOfEverythingServiceDecorator) CheckStatus(ctx *gin.Context)
- func (s *DefaultABitOfEverythingServiceDecorator) Create(ctx *gin.Context)
- func (s *DefaultABitOfEverythingServiceDecorator) CreateBody(ctx *gin.Context)
- func (s *DefaultABitOfEverythingServiceDecorator) CreateBook(ctx *gin.Context)
- func (s *DefaultABitOfEverythingServiceDecorator) DeepPathEcho(ctx *gin.Context)
- func (s *DefaultABitOfEverythingServiceDecorator) Delete(ctx *gin.Context)
- func (s *DefaultABitOfEverythingServiceDecorator) Echo(ctx *gin.Context)
- func (s *DefaultABitOfEverythingServiceDecorator) Echo_1(ctx *gin.Context)
- func (s *DefaultABitOfEverythingServiceDecorator) Echo_2(ctx *gin.Context)
- func (s *DefaultABitOfEverythingServiceDecorator) ErrorWithDetails(ctx *gin.Context)
- func (s *DefaultABitOfEverythingServiceDecorator) GetMessageWithBody(ctx *gin.Context)
- func (s *DefaultABitOfEverythingServiceDecorator) GetQuery(ctx *gin.Context)
- func (s *DefaultABitOfEverythingServiceDecorator) GetRepeatedQuery(ctx *gin.Context)
- func (s *DefaultABitOfEverythingServiceDecorator) Lookup(ctx *gin.Context)
- func (s *DefaultABitOfEverythingServiceDecorator) OverwriteResponseContentType(ctx *gin.Context)
- func (s *DefaultABitOfEverythingServiceDecorator) PostWithEmptyBody(ctx *gin.Context)
- func (s *DefaultABitOfEverythingServiceDecorator) Timeout(ctx *gin.Context)
- func (s *DefaultABitOfEverythingServiceDecorator) Update(ctx *gin.Context)
- func (s *DefaultABitOfEverythingServiceDecorator) UpdateBook(ctx *gin.Context)
- func (s *DefaultABitOfEverythingServiceDecorator) UpdateV2(ctx *gin.Context)
- func (s *DefaultABitOfEverythingServiceDecorator) UpdateV2_1(ctx *gin.Context)
- func (s *DefaultABitOfEverythingServiceDecorator) UpdateV2_2(ctx *gin.Context)
- type DefaultCamelCaseServiceNameDecorator
- type ErrorObject
- type ErrorResponse
- type IdMessage
- type MessagePathEnum
- type MessagePathEnum_NestedPathEnum
- type MessageWithBody
- type MessageWithNestedPathEnum
- type MessageWithPathEnum
- type NumericEnum
- type PathEnum
- type StringMessage
- type StringValue
- type UnimplementedABitOfEverythingServiceServer
- func (s *UnimplementedABitOfEverythingServiceServer) CheckExternalNestedPathEnum(context.Context, *MessageWithNestedPathEnum) (*emptypb.Empty, error)
- func (s *UnimplementedABitOfEverythingServiceServer) CheckExternalPathEnum(context.Context, *MessageWithPathEnum) (*emptypb.Empty, error)
- func (s *UnimplementedABitOfEverythingServiceServer) CheckGetQueryParams(context.Context, *ABitOfEverything) (*ABitOfEverything, error)
- func (s *UnimplementedABitOfEverythingServiceServer) CheckNestedEnumGetQueryParams(context.Context, *ABitOfEverything) (*ABitOfEverything, error)
- func (s *UnimplementedABitOfEverythingServiceServer) CheckPostQueryParams(context.Context, *ABitOfEverything) (*ABitOfEverything, error)
- func (s *UnimplementedABitOfEverythingServiceServer) CheckStatus(context.Context, *emptypb.Empty) (*CheckStatusResponse, error)
- func (s *UnimplementedABitOfEverythingServiceServer) Create(context.Context, *ABitOfEverything) (*ABitOfEverything, error)
- func (s *UnimplementedABitOfEverythingServiceServer) CreateBody(context.Context, *ABitOfEverything) (*ABitOfEverything, error)
- func (s *UnimplementedABitOfEverythingServiceServer) CreateBook(context.Context, *CreateBookRequest) (*Book, error)
- func (s *UnimplementedABitOfEverythingServiceServer) DeepPathEcho(context.Context, *ABitOfEverything) (*ABitOfEverything, error)
- func (s *UnimplementedABitOfEverythingServiceServer) Delete(context.Context, *IdMessage) (*emptypb.Empty, error)
- func (s *UnimplementedABitOfEverythingServiceServer) Echo(context.Context, *StringMessage) (*StringMessage, error)
- func (s *UnimplementedABitOfEverythingServiceServer) ErrorWithDetails(context.Context, *emptypb.Empty) (*emptypb.Empty, error)
- func (s *UnimplementedABitOfEverythingServiceServer) GetMessageWithBody(context.Context, *MessageWithBody) (*emptypb.Empty, error)
- func (s *UnimplementedABitOfEverythingServiceServer) GetQuery(context.Context, *ABitOfEverything) (*emptypb.Empty, error)
- func (s *UnimplementedABitOfEverythingServiceServer) GetRepeatedQuery(context.Context, *ABitOfEverythingRepeated) (*ABitOfEverythingRepeated, error)
- func (s *UnimplementedABitOfEverythingServiceServer) Lookup(context.Context, *IdMessage) (*ABitOfEverything, error)
- func (s *UnimplementedABitOfEverythingServiceServer) OverwriteResponseContentType(context.Context, *emptypb.Empty) (*StringValue, error)
- func (s *UnimplementedABitOfEverythingServiceServer) PostWithEmptyBody(context.Context, *Body) (*emptypb.Empty, error)
- func (s *UnimplementedABitOfEverythingServiceServer) Timeout(context.Context, *emptypb.Empty) (*emptypb.Empty, error)
- func (s *UnimplementedABitOfEverythingServiceServer) Update(context.Context, *ABitOfEverything) (*emptypb.Empty, error)
- func (s *UnimplementedABitOfEverythingServiceServer) UpdateBook(context.Context, *UpdateBookRequest) (*Book, error)
- func (s *UnimplementedABitOfEverythingServiceServer) UpdateV2(context.Context, *UpdateV2Request) (*emptypb.Empty, error)
- type UnimplementedCamelCaseServiceNameServer
- type UpdateBookRequest
- type UpdateV2Request
Constants ¶
This section is empty.
Variables ¶
var ( NumericEnum_name = map[int32]string{ 0: "ZERO", 1: "ONE", } NumericEnum_value = map[string]int32{ "ZERO": 0, "ONE": 1, } )
var ( PathEnum_name = map[int32]string{ 0: "ABC", 1: "DEF", } PathEnum_value = map[string]int32{ "ABC": 0, "DEF": 1, } )
var ( ABitOfEverything_Nested_DeepEnum_name = map[int32]string{ 0: "FALSE", 1: "TRUE", } ABitOfEverything_Nested_DeepEnum_value = map[string]int32{ "FALSE": 0, "TRUE": 1, } )
var ( MessagePathEnum_NestedPathEnum_name = map[int32]string{ 0: "GHI", 1: "JKL", } MessagePathEnum_NestedPathEnum_value = map[string]int32{ "GHI": 0, "JKL": 1, } )
var ( CreateEndpoint = "" /* 353-byte string literal not displayed */ CreateBodyEndpoint = "/v1/example/a_bit_of_everything" CreateBookEndpoint = "/v1/{parent=publishers/*}/books" UpdateBookEndpoint = "/v1/{book.name=publishers/*/books/*}" LookupEndpoint = "/v1/example/a_bit_of_everything/:uuid" UpdateEndpoint = "/v1/example/a_bit_of_everything/:uuid" UpdateV2Endpoint = "/v2/example/a_bit_of_everything/:abe.uuid" UpdateV2Endpoint_1 = "/v2/example/a_bit_of_everything/:abe.uuid" UpdateV2Endpoint_2 = "/v2a/example/a_bit_of_everything/:abe.uuid" DeleteEndpoint = "/v1/example/a_bit_of_everything/:uuid" GetQueryEndpoint = "/v1/example/a_bit_of_everything/query/:uuid" GetRepeatedQueryEndpoint = "" /* 486-byte string literal not displayed */ EchoEndpoint = "/v1/example/a_bit_of_everything/echo/:value" EchoEndpoint_1 = "/v2/example/echo" EchoEndpoint_2 = "/v2/example/echo" DeepPathEchoEndpoint = "/v1/example/deep_path/:single_nested.name" TimeoutEndpoint = "/v2/example/timeout" ErrorWithDetailsEndpoint = "/v2/example/errorwithdetails" GetMessageWithBodyEndpoint = "/v2/example/withbody/:id" PostWithEmptyBodyEndpoint = "/v2/example/postwithemptybody/:name" CheckGetQueryParamsEndpoint = "/v1/example/a_bit_of_everything/params/get/:single_nested.name" CheckNestedEnumGetQueryParamsEndpoint = "/v1/example/a_bit_of_everything/params/get/nested_enum/:single_nested.ok" CheckPostQueryParamsEndpoint = "/v1/example/a_bit_of_everything/params/post/:string_value" OverwriteResponseContentTypeEndpoint = "/v2/example/overwriteresponsecontenttype" CheckExternalPathEnumEndpoint = "/v2/{value}:check" CheckExternalNestedPathEnumEndpoint = "/v3/{value}:check" CheckStatusEndpoint = "/v1/example/checkStatus" )
All Endpoints
var (
EmptyEndpoint = "/v2/example/empty"
)
All Endpoints
Functions ¶
func RegisterABitOfEverythingServiceServer ¶
func RegisterABitOfEverythingServiceServer(router gin.IRouter, s ABitOfEverythingServiceServer)
RegisterABitOfEverythingServiceServer registers the http handlers for service ABitOfEverythingService to "router".
func RegisterCamelCaseServiceNameServer ¶
func RegisterCamelCaseServiceNameServer(router gin.IRouter, s CamelCaseServiceNameServer)
RegisterCamelCaseServiceNameServer registers the http handlers for service CamelCaseServiceName to "router".
Types ¶
type ABitOfEverything ¶
type ABitOfEverything struct { SingleNested *ABitOfEverything_Nested `json:"single_nested,omitempty"` Uuid string `json:"uuid,omitempty"` Nested []*ABitOfEverything_Nested `json:"nested,omitempty"` FloatValue float32 `json:"float_value,omitempty"` DoubleValue float64 `json:"double_value,omitempty"` Int64Value int64 `json:"int64_value,omitempty"` Uint64Value uint64 `json:"uint64_value,omitempty"` Int32Value int32 `json:"int32_value,omitempty"` Fixed64Value uint64 `json:"fixed64_value,omitempty"` Fixed32Value uint32 `json:"fixed32_value,omitempty"` BoolValue bool `json:"bool_value,omitempty"` StringValue string `json:"string_value,omitempty"` BytesValue []byte `json:"bytes_value,omitempty"` Uint32Value uint32 `json:"uint32_value,omitempty"` EnumValue NumericEnum `json:"enum_value,omitempty"` PathEnumValue PathEnum `json:"path_enum_value,omitempty"` NestedPathEnumValue MessagePathEnum_NestedPathEnum `json:"nested_path_enum_value,omitempty"` Sfixed32Value int32 `json:"sfixed32_value,omitempty"` Sfixed64Value int64 `json:"sfixed64_value,omitempty"` Sint32Value int32 `json:"sint32_value,omitempty"` Sint64Value int64 `json:"sint64_value,omitempty"` RepeatedStringValue []string `json:"repeated_string_value,omitempty"` OneofEmpty *emptypb.Empty `json:"oneof_empty,omitempty"` OneofString *string `json:"oneof_string,omitempty"` MapValue map[string]NumericEnum `json:"map_value,omitempty"` MappedStringValue map[string]string `json:"mapped_string_value,omitempty"` MappedNestedValue map[string]*ABitOfEverything_Nested `json:"mapped_nested_value,omitempty"` NonConventionalNameValue string `json:"nonConventionalNameValue,omitempty"` TimestampValue *timestamppb.Timestamp `json:"timestamp_value,omitempty"` // repeated enum value. it is comma-separated in query RepeatedEnumValue []NumericEnum `json:"repeated_enum_value,omitempty"` // repeated numeric enum comment (This comment is overridden by the field annotation) RepeatedEnumAnnotation []NumericEnum `json:"repeated_enum_annotation,omitempty"` // numeric enum comment (This comment is overridden by the field annotation) EnumValueAnnotation NumericEnum `json:"enum_value_annotation,omitempty"` // repeated string comment (This comment is overridden by the field annotation) RepeatedStringAnnotation []string `json:"repeated_string_annotation,omitempty"` // repeated nested object comment (This comment is overridden by the field annotation) RepeatedNestedAnnotation []*ABitOfEverything_Nested `json:"repeated_nested_annotation,omitempty"` // nested object comments (This comment is overridden by the field annotation) NestedAnnotation *ABitOfEverything_Nested `json:"nested_annotation,omitempty"` Int64OverrideType int64 `json:"int64_override_type,omitempty"` // mark a field as required in Open API definition RequiredStringViaFieldBehaviorAnnotation string `json:"required_string_via_field_behavior_annotation,omitempty"` // mark a field as readonly in Open API definition OutputOnlyStringViaFieldBehaviorAnnotation string `json:"output_only_string_via_field_behavior_annotation,omitempty"` }
Intentionally complicated message type to cover many features of Protobuf.
type ABitOfEverythingRepeated ¶
type ABitOfEverythingRepeated struct { // repeated values. they are comma-separated in path PathRepeatedFloatValue []float32 `json:"path_repeated_float_value,omitempty"` PathRepeatedDoubleValue []float64 `json:"path_repeated_double_value,omitempty"` PathRepeatedInt64Value []int64 `json:"path_repeated_int64_value,omitempty"` PathRepeatedUint64Value []uint64 `json:"path_repeated_uint64_value,omitempty"` PathRepeatedInt32Value []int32 `json:"path_repeated_int32_value,omitempty"` PathRepeatedFixed64Value []uint64 `json:"path_repeated_fixed64_value,omitempty"` PathRepeatedFixed32Value []uint32 `json:"path_repeated_fixed32_value,omitempty"` PathRepeatedBoolValue []bool `json:"path_repeated_bool_value,omitempty"` PathRepeatedStringValue []string `json:"path_repeated_string_value,omitempty"` PathRepeatedBytesValue [][]byte `json:"path_repeated_bytes_value,omitempty"` PathRepeatedUint32Value []uint32 `json:"path_repeated_uint32_value,omitempty"` PathRepeatedEnumValue []NumericEnum `json:"path_repeated_enum_value,omitempty"` PathRepeatedSfixed32Value []int32 `json:"path_repeated_sfixed32_value,omitempty"` PathRepeatedSfixed64Value []int64 `json:"path_repeated_sfixed64_value,omitempty"` PathRepeatedSint32Value []int32 `json:"path_repeated_sint32_value,omitempty"` PathRepeatedSint64Value []int64 `json:"path_repeated_sint64_value,omitempty"` }
ABitOfEverythingRepeated is used to validate repeated path parameter functionality
type ABitOfEverythingServiceClient ¶
type ABitOfEverythingServiceClient interface { // Create a new ABitOfEverything // // This API creates a new ABitOfEverything Create(context.Context, *ABitOfEverything) (*ABitOfEverything, error) CreateBody(context.Context, *ABitOfEverything) (*ABitOfEverything, error) // Create a book. CreateBook(context.Context, *CreateBookRequest) (*Book, error) UpdateBook(context.Context, *UpdateBookRequest) (*Book, error) Lookup(context.Context, *IdMessage) (*ABitOfEverything, error) Update(context.Context, *ABitOfEverything) (*emptypb.Empty, error) UpdateV2(context.Context, *UpdateV2Request) (*emptypb.Empty, error) Delete(context.Context, *IdMessage) (*emptypb.Empty, error) GetQuery(context.Context, *ABitOfEverything) (*emptypb.Empty, error) GetRepeatedQuery(context.Context, *ABitOfEverythingRepeated) (*ABitOfEverythingRepeated, error) // Echo allows posting a StringMessage value. // // It also exposes multiple bindings. // // This makes it useful when validating that the OpenAPI v2 API // description exposes documentation correctly on all paths // defined as additional_bindings in the proto. Echo(context.Context, *StringMessage) (*StringMessage, error) DeepPathEcho(context.Context, *ABitOfEverything) (*ABitOfEverything, error) // rpc NoBindings(google.protobuf.Duration) returns (google.protobuf.Empty) {} Timeout(context.Context, *emptypb.Empty) (*emptypb.Empty, error) ErrorWithDetails(context.Context, *emptypb.Empty) (*emptypb.Empty, error) GetMessageWithBody(context.Context, *MessageWithBody) (*emptypb.Empty, error) PostWithEmptyBody(context.Context, *Body) (*emptypb.Empty, error) CheckGetQueryParams(context.Context, *ABitOfEverything) (*ABitOfEverything, error) CheckNestedEnumGetQueryParams(context.Context, *ABitOfEverything) (*ABitOfEverything, error) CheckPostQueryParams(context.Context, *ABitOfEverything) (*ABitOfEverything, error) OverwriteResponseContentType(context.Context, *emptypb.Empty) (*StringValue, error) CheckExternalPathEnum(context.Context, *MessageWithPathEnum) (*emptypb.Empty, error) CheckExternalNestedPathEnum(context.Context, *MessageWithNestedPathEnum) (*emptypb.Empty, error) CheckStatus(context.Context, *emptypb.Empty) (*CheckStatusResponse, error) }
ABitOfEverythingServiceClient is the client API for for ABitOfEverythingService service.
func NewABitOfEverythingServiceClient ¶
func NewABitOfEverythingServiceClient(host string, cc *http.Client) ABitOfEverythingServiceClient
NewABitOfEverythingServiceClient creates a client API for ABitOfEverythingService service.
type ABitOfEverythingServiceServer ¶
type ABitOfEverythingServiceServer interface { // Create a new ABitOfEverything // // This API creates a new ABitOfEverything Create(context.Context, *ABitOfEverything) (*ABitOfEverything, error) CreateBody(context.Context, *ABitOfEverything) (*ABitOfEverything, error) // Create a book. CreateBook(context.Context, *CreateBookRequest) (*Book, error) UpdateBook(context.Context, *UpdateBookRequest) (*Book, error) Lookup(context.Context, *IdMessage) (*ABitOfEverything, error) Update(context.Context, *ABitOfEverything) (*emptypb.Empty, error) UpdateV2(context.Context, *UpdateV2Request) (*emptypb.Empty, error) Delete(context.Context, *IdMessage) (*emptypb.Empty, error) GetQuery(context.Context, *ABitOfEverything) (*emptypb.Empty, error) GetRepeatedQuery(context.Context, *ABitOfEverythingRepeated) (*ABitOfEverythingRepeated, error) // Echo allows posting a StringMessage value. // // It also exposes multiple bindings. // // This makes it useful when validating that the OpenAPI v2 API // description exposes documentation correctly on all paths // defined as additional_bindings in the proto. Echo(context.Context, *StringMessage) (*StringMessage, error) DeepPathEcho(context.Context, *ABitOfEverything) (*ABitOfEverything, error) // rpc NoBindings(google.protobuf.Duration) returns (google.protobuf.Empty) {} Timeout(context.Context, *emptypb.Empty) (*emptypb.Empty, error) ErrorWithDetails(context.Context, *emptypb.Empty) (*emptypb.Empty, error) GetMessageWithBody(context.Context, *MessageWithBody) (*emptypb.Empty, error) PostWithEmptyBody(context.Context, *Body) (*emptypb.Empty, error) CheckGetQueryParams(context.Context, *ABitOfEverything) (*ABitOfEverything, error) CheckNestedEnumGetQueryParams(context.Context, *ABitOfEverything) (*ABitOfEverything, error) CheckPostQueryParams(context.Context, *ABitOfEverything) (*ABitOfEverything, error) OverwriteResponseContentType(context.Context, *emptypb.Empty) (*StringValue, error) CheckExternalPathEnum(context.Context, *MessageWithPathEnum) (*emptypb.Empty, error) CheckExternalNestedPathEnum(context.Context, *MessageWithNestedPathEnum) (*emptypb.Empty, error) CheckStatus(context.Context, *emptypb.Empty) (*CheckStatusResponse, error) }
ABitOfEverythingServiceServer is the server API for ABitOfEverythingService service.
type ABitOfEverything_MapValueEntry ¶
type ABitOfEverything_MapValueEntry struct { Key string `json:"key,omitempty"` Value NumericEnum `json:"value,omitempty"` }
type ABitOfEverything_MappedNestedValueEntry ¶
type ABitOfEverything_MappedNestedValueEntry struct { Key string `json:"key,omitempty"` Value *ABitOfEverything_Nested `json:"value,omitempty"` }
type ABitOfEverything_Nested ¶
type ABitOfEverything_Nested struct { // name is nested field. Name string `json:"name,omitempty"` Amount uint32 `json:"amount,omitempty"` // DeepEnum comment. Ok ABitOfEverything_Nested_DeepEnum `json:"ok,omitempty"` }
Nested is nested type.
type ABitOfEverything_Nested_DeepEnum ¶
type ABitOfEverything_Nested_DeepEnum int32
DeepEnum is one or zero.
const ( // FALSE is false. ABitOfEverything_Nested_FALSE ABitOfEverything_Nested_DeepEnum = 0 // TRUE is true. ABitOfEverything_Nested_TRUE ABitOfEverything_Nested_DeepEnum = 1 )
func (ABitOfEverything_Nested_DeepEnum) IsValid ¶
func (x ABitOfEverything_Nested_DeepEnum) IsValid() bool
func (ABitOfEverything_Nested_DeepEnum) String ¶
func (x ABitOfEverything_Nested_DeepEnum) String() string
type Book ¶
type Book 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 *timestamppb.Timestamp `json:"create_time,omitempty"` }
An example resource type from AIP-123 used to test the behavior described in the CreateBookRequest message.
type CamelCaseServiceNameClient ¶
type CamelCaseServiceNameClient interface {
Empty(context.Context, *emptypb.Empty) (*emptypb.Empty, error)
}
CamelCaseServiceNameClient is the client API for for CamelCaseServiceName service.
func NewCamelCaseServiceNameClient ¶
func NewCamelCaseServiceNameClient(host string, cc *http.Client) CamelCaseServiceNameClient
NewCamelCaseServiceNameClient creates a client API for CamelCaseServiceName service.
type CamelCaseServiceNameServer ¶
type CamelCaseServiceNameServer interface {
Empty(context.Context, *emptypb.Empty) (*emptypb.Empty, error)
}
CamelCaseServiceNameServer is the server API for CamelCaseServiceName service.
type CheckStatusResponse ¶
type CreateBookRequest ¶
type CreateBookRequest struct { // The publisher in which to create the book. // // Format: `publishers/{publisher}` // // Example: `publishers/1257894000000000000` Parent string `json:"parent,omitempty"` // The book to create. Book *Book `json:"book,omitempty"` // The ID to use for the book. // // This must start with an alphanumeric character. BookId string `json:"book_id,omitempty"` }
A standard Create message from AIP-133 with a user-specified ID. The user-specified ID (the `book_id` field in this example) must become a query parameter in the OpenAPI spec.
type DefaultABitOfEverythingServiceDecorator ¶
type DefaultABitOfEverythingServiceDecorator struct {
// contains filtered or unexported fields
}
DefaultABitOfEverythingServiceDecorator the default decorator.
func NewDefaultABitOfEverythingServiceDecorator ¶
func NewDefaultABitOfEverythingServiceDecorator(ss ABitOfEverythingServiceServer) *DefaultABitOfEverythingServiceDecorator
NewDefaultABitOfEverythingServiceDecorator constructs a new default ABitOfEverythingService decorator
func (*DefaultABitOfEverythingServiceDecorator) CheckExternalNestedPathEnum ¶
func (s *DefaultABitOfEverythingServiceDecorator) CheckExternalNestedPathEnum(ctx *gin.Context)
func (*DefaultABitOfEverythingServiceDecorator) CheckExternalPathEnum ¶
func (s *DefaultABitOfEverythingServiceDecorator) CheckExternalPathEnum(ctx *gin.Context)
func (*DefaultABitOfEverythingServiceDecorator) CheckGetQueryParams ¶
func (s *DefaultABitOfEverythingServiceDecorator) CheckGetQueryParams(ctx *gin.Context)
func (*DefaultABitOfEverythingServiceDecorator) CheckNestedEnumGetQueryParams ¶
func (s *DefaultABitOfEverythingServiceDecorator) CheckNestedEnumGetQueryParams(ctx *gin.Context)
func (*DefaultABitOfEverythingServiceDecorator) CheckPostQueryParams ¶
func (s *DefaultABitOfEverythingServiceDecorator) CheckPostQueryParams(ctx *gin.Context)
func (*DefaultABitOfEverythingServiceDecorator) CheckStatus ¶
func (s *DefaultABitOfEverythingServiceDecorator) CheckStatus(ctx *gin.Context)
func (*DefaultABitOfEverythingServiceDecorator) Create ¶
func (s *DefaultABitOfEverythingServiceDecorator) Create(ctx *gin.Context)
func (*DefaultABitOfEverythingServiceDecorator) CreateBody ¶
func (s *DefaultABitOfEverythingServiceDecorator) CreateBody(ctx *gin.Context)
func (*DefaultABitOfEverythingServiceDecorator) CreateBook ¶
func (s *DefaultABitOfEverythingServiceDecorator) CreateBook(ctx *gin.Context)
func (*DefaultABitOfEverythingServiceDecorator) DeepPathEcho ¶
func (s *DefaultABitOfEverythingServiceDecorator) DeepPathEcho(ctx *gin.Context)
func (*DefaultABitOfEverythingServiceDecorator) Delete ¶
func (s *DefaultABitOfEverythingServiceDecorator) Delete(ctx *gin.Context)
func (*DefaultABitOfEverythingServiceDecorator) Echo ¶
func (s *DefaultABitOfEverythingServiceDecorator) Echo(ctx *gin.Context)
func (*DefaultABitOfEverythingServiceDecorator) Echo_1 ¶
func (s *DefaultABitOfEverythingServiceDecorator) Echo_1(ctx *gin.Context)
func (*DefaultABitOfEverythingServiceDecorator) Echo_2 ¶
func (s *DefaultABitOfEverythingServiceDecorator) Echo_2(ctx *gin.Context)
func (*DefaultABitOfEverythingServiceDecorator) ErrorWithDetails ¶
func (s *DefaultABitOfEverythingServiceDecorator) ErrorWithDetails(ctx *gin.Context)
func (*DefaultABitOfEverythingServiceDecorator) GetMessageWithBody ¶
func (s *DefaultABitOfEverythingServiceDecorator) GetMessageWithBody(ctx *gin.Context)
func (*DefaultABitOfEverythingServiceDecorator) GetQuery ¶
func (s *DefaultABitOfEverythingServiceDecorator) GetQuery(ctx *gin.Context)
func (*DefaultABitOfEverythingServiceDecorator) GetRepeatedQuery ¶
func (s *DefaultABitOfEverythingServiceDecorator) GetRepeatedQuery(ctx *gin.Context)
func (*DefaultABitOfEverythingServiceDecorator) Lookup ¶
func (s *DefaultABitOfEverythingServiceDecorator) Lookup(ctx *gin.Context)
func (*DefaultABitOfEverythingServiceDecorator) OverwriteResponseContentType ¶
func (s *DefaultABitOfEverythingServiceDecorator) OverwriteResponseContentType(ctx *gin.Context)
func (*DefaultABitOfEverythingServiceDecorator) PostWithEmptyBody ¶
func (s *DefaultABitOfEverythingServiceDecorator) PostWithEmptyBody(ctx *gin.Context)
func (*DefaultABitOfEverythingServiceDecorator) Timeout ¶
func (s *DefaultABitOfEverythingServiceDecorator) Timeout(ctx *gin.Context)
func (*DefaultABitOfEverythingServiceDecorator) Update ¶
func (s *DefaultABitOfEverythingServiceDecorator) Update(ctx *gin.Context)
func (*DefaultABitOfEverythingServiceDecorator) UpdateBook ¶
func (s *DefaultABitOfEverythingServiceDecorator) UpdateBook(ctx *gin.Context)
func (*DefaultABitOfEverythingServiceDecorator) UpdateV2 ¶
func (s *DefaultABitOfEverythingServiceDecorator) UpdateV2(ctx *gin.Context)
func (*DefaultABitOfEverythingServiceDecorator) UpdateV2_1 ¶
func (s *DefaultABitOfEverythingServiceDecorator) UpdateV2_1(ctx *gin.Context)
func (*DefaultABitOfEverythingServiceDecorator) UpdateV2_2 ¶
func (s *DefaultABitOfEverythingServiceDecorator) UpdateV2_2(ctx *gin.Context)
type DefaultCamelCaseServiceNameDecorator ¶
type DefaultCamelCaseServiceNameDecorator struct {
// contains filtered or unexported fields
}
DefaultCamelCaseServiceNameDecorator the default decorator.
func NewDefaultCamelCaseServiceNameDecorator ¶
func NewDefaultCamelCaseServiceNameDecorator(ss CamelCaseServiceNameServer) *DefaultCamelCaseServiceNameDecorator
NewDefaultCamelCaseServiceNameDecorator constructs a new default CamelCaseServiceName decorator
func (*DefaultCamelCaseServiceNameDecorator) Empty ¶
func (s *DefaultCamelCaseServiceNameDecorator) Empty(ctx *gin.Context)
type ErrorObject ¶
type ErrorResponse ¶
type ErrorResponse struct { CorrelationId string `json:"correlationId,omitempty"` Error *ErrorObject `json:"error,omitempty"` }
type MessagePathEnum ¶
type MessagePathEnum struct { }
type MessagePathEnum_NestedPathEnum ¶
type MessagePathEnum_NestedPathEnum int32
const ( MessagePathEnum_GHI MessagePathEnum_NestedPathEnum = 0 MessagePathEnum_JKL MessagePathEnum_NestedPathEnum = 1 )
func (MessagePathEnum_NestedPathEnum) IsValid ¶
func (x MessagePathEnum_NestedPathEnum) IsValid() bool
func (MessagePathEnum_NestedPathEnum) String ¶
func (x MessagePathEnum_NestedPathEnum) String() string
type MessageWithBody ¶
type MessageWithNestedPathEnum ¶
type MessageWithNestedPathEnum struct {
Value MessagePathEnum_NestedPathEnum `json:"value,omitempty"`
}
type MessageWithPathEnum ¶
type MessageWithPathEnum struct {
Value PathEnum `json:"value,omitempty"`
}
type NumericEnum ¶
type NumericEnum int32
NumericEnum is one or zero.
const ( // ZERO means 0 NumericEnum_ZERO NumericEnum = 0 // ONE means 1 NumericEnum_ONE NumericEnum = 1 )
func (NumericEnum) IsValid ¶
func (x NumericEnum) IsValid() bool
func (NumericEnum) String ¶
func (x NumericEnum) String() string
type StringMessage ¶
type StringMessage struct {
Value string `json:"value,omitempty"`
}
type StringValue ¶
type StringValue struct {
Value string `json:"value,omitempty"`
}
type UnimplementedABitOfEverythingServiceServer ¶
type UnimplementedABitOfEverythingServiceServer struct{}
UnimplementedABitOfEverythingServiceServer can be embedded to have forward compatible implementations.
func (*UnimplementedABitOfEverythingServiceServer) CheckExternalNestedPathEnum ¶
func (s *UnimplementedABitOfEverythingServiceServer) CheckExternalNestedPathEnum(context.Context, *MessageWithNestedPathEnum) (*emptypb.Empty, error)
func (*UnimplementedABitOfEverythingServiceServer) CheckExternalPathEnum ¶
func (s *UnimplementedABitOfEverythingServiceServer) CheckExternalPathEnum(context.Context, *MessageWithPathEnum) (*emptypb.Empty, error)
func (*UnimplementedABitOfEverythingServiceServer) CheckGetQueryParams ¶
func (s *UnimplementedABitOfEverythingServiceServer) CheckGetQueryParams(context.Context, *ABitOfEverything) (*ABitOfEverything, error)
func (*UnimplementedABitOfEverythingServiceServer) CheckNestedEnumGetQueryParams ¶
func (s *UnimplementedABitOfEverythingServiceServer) CheckNestedEnumGetQueryParams(context.Context, *ABitOfEverything) (*ABitOfEverything, error)
func (*UnimplementedABitOfEverythingServiceServer) CheckPostQueryParams ¶
func (s *UnimplementedABitOfEverythingServiceServer) CheckPostQueryParams(context.Context, *ABitOfEverything) (*ABitOfEverything, error)
func (*UnimplementedABitOfEverythingServiceServer) CheckStatus ¶
func (s *UnimplementedABitOfEverythingServiceServer) CheckStatus(context.Context, *emptypb.Empty) (*CheckStatusResponse, error)
func (*UnimplementedABitOfEverythingServiceServer) Create ¶
func (s *UnimplementedABitOfEverythingServiceServer) Create(context.Context, *ABitOfEverything) (*ABitOfEverything, error)
func (*UnimplementedABitOfEverythingServiceServer) CreateBody ¶
func (s *UnimplementedABitOfEverythingServiceServer) CreateBody(context.Context, *ABitOfEverything) (*ABitOfEverything, error)
func (*UnimplementedABitOfEverythingServiceServer) CreateBook ¶
func (s *UnimplementedABitOfEverythingServiceServer) CreateBook(context.Context, *CreateBookRequest) (*Book, error)
func (*UnimplementedABitOfEverythingServiceServer) DeepPathEcho ¶
func (s *UnimplementedABitOfEverythingServiceServer) DeepPathEcho(context.Context, *ABitOfEverything) (*ABitOfEverything, error)
func (*UnimplementedABitOfEverythingServiceServer) Echo ¶
func (s *UnimplementedABitOfEverythingServiceServer) Echo(context.Context, *StringMessage) (*StringMessage, error)
func (*UnimplementedABitOfEverythingServiceServer) ErrorWithDetails ¶
func (*UnimplementedABitOfEverythingServiceServer) GetMessageWithBody ¶
func (s *UnimplementedABitOfEverythingServiceServer) GetMessageWithBody(context.Context, *MessageWithBody) (*emptypb.Empty, error)
func (*UnimplementedABitOfEverythingServiceServer) GetQuery ¶
func (s *UnimplementedABitOfEverythingServiceServer) GetQuery(context.Context, *ABitOfEverything) (*emptypb.Empty, error)
func (*UnimplementedABitOfEverythingServiceServer) GetRepeatedQuery ¶
func (s *UnimplementedABitOfEverythingServiceServer) GetRepeatedQuery(context.Context, *ABitOfEverythingRepeated) (*ABitOfEverythingRepeated, error)
func (*UnimplementedABitOfEverythingServiceServer) Lookup ¶
func (s *UnimplementedABitOfEverythingServiceServer) Lookup(context.Context, *IdMessage) (*ABitOfEverything, error)
func (*UnimplementedABitOfEverythingServiceServer) OverwriteResponseContentType ¶
func (s *UnimplementedABitOfEverythingServiceServer) OverwriteResponseContentType(context.Context, *emptypb.Empty) (*StringValue, error)
func (*UnimplementedABitOfEverythingServiceServer) PostWithEmptyBody ¶
func (*UnimplementedABitOfEverythingServiceServer) Update ¶
func (s *UnimplementedABitOfEverythingServiceServer) Update(context.Context, *ABitOfEverything) (*emptypb.Empty, error)
func (*UnimplementedABitOfEverythingServiceServer) UpdateBook ¶
func (s *UnimplementedABitOfEverythingServiceServer) UpdateBook(context.Context, *UpdateBookRequest) (*Book, error)
func (*UnimplementedABitOfEverythingServiceServer) UpdateV2 ¶
func (s *UnimplementedABitOfEverythingServiceServer) UpdateV2(context.Context, *UpdateV2Request) (*emptypb.Empty, error)
type UnimplementedCamelCaseServiceNameServer ¶
type UnimplementedCamelCaseServiceNameServer struct{}
UnimplementedCamelCaseServiceNameServer can be embedded to have forward compatible implementations.
type UpdateBookRequest ¶
type UpdateBookRequest struct { // The book to update. // // The book's `name` field is used to identify the book to be updated. // Format: publishers/{publisher}/books/{book} Book *Book `json:"book,omitempty"` // The list of fields to be updated. UpdateMask *fieldmaskpb.FieldMask `json:"update_mask,omitempty"` // If set to true, and the book is not found, a new book will be created. // In this situation, `update_mask` is ignored. AllowMissing bool `json:"allow_missing,omitempty"` }
A standard Update message from AIP-134
type UpdateV2Request ¶
type UpdateV2Request struct { Abe *ABitOfEverything `json:"abe,omitempty"` // The paths to update. UpdateMask *fieldmaskpb.FieldMask `json:"update_mask,omitempty"` }
UpdateV2Request request for update includes the message and the update mask