example

package
v0.0.0-...-225f367 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2022 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	NumericEnum_name = map[int32]string{
		0: "ZERO",
		1: "ONE",
	}

	NumericEnum_value = map[string]int32{
		"ZERO": 0,
		"ONE":  1,
	}
)
View Source
var (
	PathEnum_name = map[int32]string{
		0: "ABC",
		1: "DEF",
	}

	PathEnum_value = map[string]int32{
		"ABC": 0,
		"DEF": 1,
	}
)
View Source
var (
	ABitOfEverything_Nested_DeepEnum_name = map[int32]string{
		0: "FALSE",
		1: "TRUE",
	}

	ABitOfEverything_Nested_DeepEnum_value = map[string]int32{
		"FALSE": 0,
		"TRUE":  1,
	}
)
View Source
var (
	MessagePathEnum_NestedPathEnum_name = map[int32]string{
		0: "GHI",
		1: "JKL",
	}

	MessagePathEnum_NestedPathEnum_value = map[string]int32{
		"GHI": 0,
		"JKL": 1,
	}
)
View Source
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

View Source
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_MappedStringValueEntry

type ABitOfEverything_MappedStringValueEntry struct {
	Key   string `json:"key,omitempty"`
	Value string `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 (ABitOfEverything_Nested_DeepEnum) String

type Body

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

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.

See: https://google.aip.dev/123

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 CheckStatusResponse struct {
	Status *status1.Status `json:"status,omitempty"`
}

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.

See: https://google.aip.dev/133#user-specified-ids

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 (*DefaultABitOfEverythingServiceDecorator) Create

func (*DefaultABitOfEverythingServiceDecorator) CreateBody

func (*DefaultABitOfEverythingServiceDecorator) CreateBook

func (*DefaultABitOfEverythingServiceDecorator) DeepPathEcho

func (s *DefaultABitOfEverythingServiceDecorator) DeepPathEcho(ctx *gin.Context)

func (*DefaultABitOfEverythingServiceDecorator) Delete

func (*DefaultABitOfEverythingServiceDecorator) Echo

func (*DefaultABitOfEverythingServiceDecorator) Echo_1

func (*DefaultABitOfEverythingServiceDecorator) Echo_2

func (*DefaultABitOfEverythingServiceDecorator) ErrorWithDetails

func (s *DefaultABitOfEverythingServiceDecorator) ErrorWithDetails(ctx *gin.Context)

func (*DefaultABitOfEverythingServiceDecorator) GetMessageWithBody

func (s *DefaultABitOfEverythingServiceDecorator) GetMessageWithBody(ctx *gin.Context)

func (*DefaultABitOfEverythingServiceDecorator) GetQuery

func (*DefaultABitOfEverythingServiceDecorator) GetRepeatedQuery

func (s *DefaultABitOfEverythingServiceDecorator) GetRepeatedQuery(ctx *gin.Context)

func (*DefaultABitOfEverythingServiceDecorator) Lookup

func (*DefaultABitOfEverythingServiceDecorator) OverwriteResponseContentType

func (s *DefaultABitOfEverythingServiceDecorator) OverwriteResponseContentType(ctx *gin.Context)

func (*DefaultABitOfEverythingServiceDecorator) PostWithEmptyBody

func (s *DefaultABitOfEverythingServiceDecorator) PostWithEmptyBody(ctx *gin.Context)

func (*DefaultABitOfEverythingServiceDecorator) Timeout

func (*DefaultABitOfEverythingServiceDecorator) Update

func (*DefaultABitOfEverythingServiceDecorator) UpdateBook

func (*DefaultABitOfEverythingServiceDecorator) UpdateV2

func (*DefaultABitOfEverythingServiceDecorator) UpdateV2_1

func (*DefaultABitOfEverythingServiceDecorator) UpdateV2_2

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

type ErrorObject

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

type ErrorResponse

type ErrorResponse struct {
	CorrelationId string       `json:"correlationId,omitempty"`
	Error         *ErrorObject `json:"error,omitempty"`
}

type IdMessage

type IdMessage struct {
	Uuid string `json:"uuid,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 (MessagePathEnum_NestedPathEnum) String

type MessageWithBody

type MessageWithBody struct {
	Id   string `json:"id,omitempty"`
	Data *Body  `json:"data,omitempty"`
}

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 PathEnum

type PathEnum int32
const (
	PathEnum_ABC PathEnum = 0
	PathEnum_DEF PathEnum = 1
)

func (PathEnum) IsValid

func (x PathEnum) IsValid() bool

func (PathEnum) String

func (x PathEnum) 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 (*UnimplementedABitOfEverythingServiceServer) CheckExternalPathEnum

func (*UnimplementedABitOfEverythingServiceServer) CheckGetQueryParams

func (*UnimplementedABitOfEverythingServiceServer) CheckNestedEnumGetQueryParams

func (*UnimplementedABitOfEverythingServiceServer) CheckPostQueryParams

func (*UnimplementedABitOfEverythingServiceServer) CheckStatus

func (*UnimplementedABitOfEverythingServiceServer) Create

func (*UnimplementedABitOfEverythingServiceServer) CreateBody

func (*UnimplementedABitOfEverythingServiceServer) CreateBook

func (*UnimplementedABitOfEverythingServiceServer) DeepPathEcho

func (*UnimplementedABitOfEverythingServiceServer) Delete

func (*UnimplementedABitOfEverythingServiceServer) Echo

func (*UnimplementedABitOfEverythingServiceServer) ErrorWithDetails

func (*UnimplementedABitOfEverythingServiceServer) GetMessageWithBody

func (*UnimplementedABitOfEverythingServiceServer) GetQuery

func (*UnimplementedABitOfEverythingServiceServer) GetRepeatedQuery

func (*UnimplementedABitOfEverythingServiceServer) Lookup

func (*UnimplementedABitOfEverythingServiceServer) OverwriteResponseContentType

func (*UnimplementedABitOfEverythingServiceServer) PostWithEmptyBody

func (*UnimplementedABitOfEverythingServiceServer) Timeout

func (*UnimplementedABitOfEverythingServiceServer) Update

func (*UnimplementedABitOfEverythingServiceServer) UpdateBook

func (*UnimplementedABitOfEverythingServiceServer) UpdateV2

type UnimplementedCamelCaseServiceNameServer

type UnimplementedCamelCaseServiceNameServer struct{}

UnimplementedCamelCaseServiceNameServer can be embedded to have forward compatible implementations.

func (*UnimplementedCamelCaseServiceNameServer) Empty

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

See: https://google.aip.dev/134#request-message

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

Jump to

Keyboard shortcuts

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