http

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	HttpMethod_name = map[int32]string{
		0: "HTTP_METHOD_UNSPECIFIED",
		1: "HTTP_METHOD_GET",
		2: "HTTP_METHOD_POST",
		3: "HTTP_METHOD_PUT",
		4: "HTTP_METHOD_DELETE",
		5: "HTTP_METHOD_PATCH",
	}
	HttpMethod_value = map[string]int32{
		"HTTP_METHOD_UNSPECIFIED": 0,
		"HTTP_METHOD_GET":         1,
		"HTTP_METHOD_POST":        2,
		"HTTP_METHOD_PUT":         3,
		"HTTP_METHOD_DELETE":      4,
		"HTTP_METHOD_PATCH":       5,
	}
)

Enum value maps for HttpMethod.

View Source
var (
	Int64Encoding_name = map[int32]string{
		0: "INT64_ENCODING_UNSPECIFIED",
		1: "INT64_ENCODING_STRING",
		2: "INT64_ENCODING_NUMBER",
	}
	Int64Encoding_value = map[string]int32{
		"INT64_ENCODING_UNSPECIFIED": 0,
		"INT64_ENCODING_STRING":      1,
		"INT64_ENCODING_NUMBER":      2,
	}
)

Enum value maps for Int64Encoding.

View Source
var (
	EnumEncoding_name = map[int32]string{
		0: "ENUM_ENCODING_UNSPECIFIED",
		1: "ENUM_ENCODING_STRING",
		2: "ENUM_ENCODING_NUMBER",
	}
	EnumEncoding_value = map[string]int32{
		"ENUM_ENCODING_UNSPECIFIED": 0,
		"ENUM_ENCODING_STRING":      1,
		"ENUM_ENCODING_NUMBER":      2,
	}
)

Enum value maps for EnumEncoding.

View Source
var (
	EmptyBehavior_name = map[int32]string{
		0: "EMPTY_BEHAVIOR_UNSPECIFIED",
		1: "EMPTY_BEHAVIOR_PRESERVE",
		2: "EMPTY_BEHAVIOR_NULL",
		3: "EMPTY_BEHAVIOR_OMIT",
	}
	EmptyBehavior_value = map[string]int32{
		"EMPTY_BEHAVIOR_UNSPECIFIED": 0,
		"EMPTY_BEHAVIOR_PRESERVE":    1,
		"EMPTY_BEHAVIOR_NULL":        2,
		"EMPTY_BEHAVIOR_OMIT":        3,
	}
)

Enum value maps for EmptyBehavior.

View Source
var (
	TimestampFormat_name = map[int32]string{
		0: "TIMESTAMP_FORMAT_UNSPECIFIED",
		1: "TIMESTAMP_FORMAT_RFC3339",
		2: "TIMESTAMP_FORMAT_UNIX_SECONDS",
		3: "TIMESTAMP_FORMAT_UNIX_MILLIS",
		4: "TIMESTAMP_FORMAT_DATE",
	}
	TimestampFormat_value = map[string]int32{
		"TIMESTAMP_FORMAT_UNSPECIFIED":  0,
		"TIMESTAMP_FORMAT_RFC3339":      1,
		"TIMESTAMP_FORMAT_UNIX_SECONDS": 2,
		"TIMESTAMP_FORMAT_UNIX_MILLIS":  3,
		"TIMESTAMP_FORMAT_DATE":         4,
	}
)

Enum value maps for TimestampFormat.

View Source
var (
	BytesEncoding_name = map[int32]string{
		0: "BYTES_ENCODING_UNSPECIFIED",
		1: "BYTES_ENCODING_BASE64",
		2: "BYTES_ENCODING_BASE64_RAW",
		3: "BYTES_ENCODING_BASE64URL",
		4: "BYTES_ENCODING_BASE64URL_RAW",
		5: "BYTES_ENCODING_HEX",
	}
	BytesEncoding_value = map[string]int32{
		"BYTES_ENCODING_UNSPECIFIED":   0,
		"BYTES_ENCODING_BASE64":        1,
		"BYTES_ENCODING_BASE64_RAW":    2,
		"BYTES_ENCODING_BASE64URL":     3,
		"BYTES_ENCODING_BASE64URL_RAW": 4,
		"BYTES_ENCODING_HEX":           5,
	}
)

Enum value maps for BytesEncoding.

View Source
var (
	// Example values for documentation/OpenAPI
	//
	// optional sebuf.http.FieldExamples field_examples = 50007;
	E_FieldExamples = &file_sebuf_http_annotations_proto_extTypes[3]
	// Query parameter configuration for a field
	//
	// optional sebuf.http.QueryConfig query = 50008;
	E_Query = &file_sebuf_http_annotations_proto_extTypes[4]
	// Mark a repeated field for unwrapping when parent message is a map value.
	// When set to true on a repeated field, and the message containing this field
	// is used as a map value, the JSON serialization will collapse the wrapper
	// to just the unwrapped field's array value.
	// Constraints: Only valid on repeated fields, only one per message.
	//
	// optional bool unwrap = 50009;
	E_Unwrap = &file_sebuf_http_annotations_proto_extTypes[5]
	// Controls int64/uint64 JSON encoding for this field.
	// Valid on: int64, sint64, sfixed64, uint64, fixed64 fields.
	// Default: STRING encoding (protojson default for JavaScript precision safety).
	//
	// optional sebuf.http.Int64Encoding int64_encoding = 50010;
	E_Int64Encoding = &file_sebuf_http_annotations_proto_extTypes[6]
	// Controls enum JSON encoding for this field.
	// Valid on: enum fields only.
	// Default: STRING encoding (protojson default using proto enum names).
	//
	// optional sebuf.http.EnumEncoding enum_encoding = 50011;
	E_EnumEncoding = &file_sebuf_http_annotations_proto_extTypes[7]
	// Mark a primitive field as nullable (explicit null vs absent).
	// Only valid on proto3 optional fields (HasOptionalKeyword=true).
	// When true: unset field serializes as null, set field serializes normally.
	// When false (default): unset field is omitted from JSON.
	//
	// optional bool nullable = 50013;
	E_Nullable = &file_sebuf_http_annotations_proto_extTypes[8]
	// Controls how empty message fields serialize to JSON.
	// Only valid on singular message fields (not repeated, not map).
	// "Empty" = all fields at proto default (proto.Size() == 0).
	//
	// optional sebuf.http.EmptyBehavior empty_behavior = 50014;
	E_EmptyBehavior = &file_sebuf_http_annotations_proto_extTypes[9]
	// Controls timestamp JSON encoding for this field.
	// Valid on: google.protobuf.Timestamp fields only.
	// Default: RFC3339 (protojson default).
	//
	// optional sebuf.http.TimestampFormat timestamp_format = 50015;
	E_TimestampFormat = &file_sebuf_http_annotations_proto_extTypes[10]
	// Controls bytes JSON encoding for this field.
	// Valid on: bytes fields only.
	// Default: BASE64 (protojson default).
	//
	// optional sebuf.http.BytesEncoding bytes_encoding = 50016;
	E_BytesEncoding = &file_sebuf_http_annotations_proto_extTypes[11]
	// Custom discriminator value for this oneof variant field.
	// When set, this value is used in the discriminator field instead of the proto field name.
	// Only valid on fields that are part of a oneof with oneof_config annotation.
	//
	// optional string oneof_value = 50018;
	E_OneofValue = &file_sebuf_http_annotations_proto_extTypes[12]
	// Flatten a nested message field, promoting its child fields to the parent level in JSON.
	// Only valid on singular message fields (not repeated, not map, not oneof variant).
	// When true: child message fields appear at the parent level (e.g., address.street becomes street).
	//
	// optional bool flatten = 50019;
	E_Flatten = &file_sebuf_http_annotations_proto_extTypes[13]
	// Prefix to prepend to flattened field names to avoid collisions.
	// Only valid when flatten=true is also set.
	// Example: flatten_prefix="billing_" with child field "street" produces "billing_street" in JSON.
	//
	// optional string flatten_prefix = 50020;
	E_FlattenPrefix = &file_sebuf_http_annotations_proto_extTypes[14]
)

Extension fields to descriptorpb.FieldOptions.

View Source
var (
	// optional sebuf.http.HttpConfig config = 50003;
	E_Config = &file_sebuf_http_annotations_proto_extTypes[0]
)

Extension fields to descriptorpb.MethodOptions.

View Source
var (
	// Custom JSON string for this enum value (e.g., "active" instead of "STATUS_ACTIVE").
	// When set, this value is used for JSON serialization instead of the proto name.
	// Combines with enum_encoding=STRING on fields using this enum.
	//
	// optional string enum_value = 50012;
	E_EnumValue = &file_sebuf_http_annotations_proto_extTypes[15]
)

Extension fields to descriptorpb.EnumValueOptions.

View Source
var (
	// optional sebuf.http.MethodHeaders method_headers = 50006;
	E_MethodHeaders = &file_proto_sebuf_http_headers_proto_extTypes[1]
)

Extension fields to descriptorpb.MethodOptions.

View Source
var (
	// Controls oneof serialization as a discriminated union.
	// When set, adds a discriminator field to the JSON output identifying which variant is set.
	//
	// optional sebuf.http.OneofConfig oneof_config = 50017;
	E_OneofConfig = &file_sebuf_http_annotations_proto_extTypes[2]
)

Extension fields to descriptorpb.OneofOptions.

View Source
var (
	// optional sebuf.http.ServiceConfig service_config = 50004;
	E_ServiceConfig = &file_sebuf_http_annotations_proto_extTypes[1]
)

Extension fields to descriptorpb.ServiceOptions.

View Source
var (
	// optional sebuf.http.ServiceHeaders service_headers = 50005;
	E_ServiceHeaders = &file_proto_sebuf_http_headers_proto_extTypes[0]
)

Extension fields to descriptorpb.ServiceOptions.

View Source
var File_proto_sebuf_http_errors_proto protoreflect.FileDescriptor
View Source
var File_proto_sebuf_http_headers_proto protoreflect.FileDescriptor
View Source
var File_sebuf_http_annotations_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type BytesEncoding added in v0.7.0

type BytesEncoding int32

BytesEncoding controls how bytes fields serialize to JSON.

const (
	// Follow protojson default (standard base64 with padding)
	BytesEncoding_BYTES_ENCODING_UNSPECIFIED BytesEncoding = 0
	// Standard base64 with padding (RFC 4648): "SGVsbG8="
	BytesEncoding_BYTES_ENCODING_BASE64 BytesEncoding = 1
	// Base64 without padding: "SGVsbG8"
	BytesEncoding_BYTES_ENCODING_BASE64_RAW BytesEncoding = 2
	// URL-safe base64 with padding: "SGVsbG8="
	BytesEncoding_BYTES_ENCODING_BASE64URL BytesEncoding = 3
	// URL-safe base64 without padding: "SGVsbG8"
	BytesEncoding_BYTES_ENCODING_BASE64URL_RAW BytesEncoding = 4
	// Hexadecimal encoding (lowercase): "48656c6c6f"
	BytesEncoding_BYTES_ENCODING_HEX BytesEncoding = 5
)

func (BytesEncoding) Descriptor added in v0.7.0

func (BytesEncoding) Enum added in v0.7.0

func (x BytesEncoding) Enum() *BytesEncoding

func (BytesEncoding) EnumDescriptor deprecated added in v0.7.0

func (BytesEncoding) EnumDescriptor() ([]byte, []int)

Deprecated: Use BytesEncoding.Descriptor instead.

func (BytesEncoding) Number added in v0.7.0

func (BytesEncoding) String added in v0.7.0

func (x BytesEncoding) String() string

func (BytesEncoding) Type added in v0.7.0

type EmptyBehavior added in v0.6.0

type EmptyBehavior int32

EmptyBehavior controls how empty message fields serialize to JSON. "Empty" means all fields at proto default (proto.Size() == 0).

const (
	// Follow default behavior: serialize empty messages as {} (same as PRESERVE)
	EmptyBehavior_EMPTY_BEHAVIOR_UNSPECIFIED EmptyBehavior = 0
	// Serialize empty messages as {} (explicit same as default)
	EmptyBehavior_EMPTY_BEHAVIOR_PRESERVE EmptyBehavior = 1
	// Serialize empty messages as null
	EmptyBehavior_EMPTY_BEHAVIOR_NULL EmptyBehavior = 2
	// Omit the field entirely when message is empty
	EmptyBehavior_EMPTY_BEHAVIOR_OMIT EmptyBehavior = 3
)

func (EmptyBehavior) Descriptor added in v0.6.0

func (EmptyBehavior) Enum added in v0.6.0

func (x EmptyBehavior) Enum() *EmptyBehavior

func (EmptyBehavior) EnumDescriptor deprecated added in v0.6.0

func (EmptyBehavior) EnumDescriptor() ([]byte, []int)

Deprecated: Use EmptyBehavior.Descriptor instead.

func (EmptyBehavior) Number added in v0.6.0

func (EmptyBehavior) String added in v0.6.0

func (x EmptyBehavior) String() string

func (EmptyBehavior) Type added in v0.6.0

type EnumEncoding added in v0.6.0

type EnumEncoding int32

EnumEncoding controls how enum fields serialize to JSON

const (
	// Follow protojson default (serialize as proto name string)
	EnumEncoding_ENUM_ENCODING_UNSPECIFIED EnumEncoding = 0
	// Explicit string encoding: "STATUS_ACTIVE"
	EnumEncoding_ENUM_ENCODING_STRING EnumEncoding = 1
	// Numeric encoding: 1
	EnumEncoding_ENUM_ENCODING_NUMBER EnumEncoding = 2
)

func (EnumEncoding) Descriptor added in v0.6.0

func (EnumEncoding) Enum added in v0.6.0

func (x EnumEncoding) Enum() *EnumEncoding

func (EnumEncoding) EnumDescriptor deprecated added in v0.6.0

func (EnumEncoding) EnumDescriptor() ([]byte, []int)

Deprecated: Use EnumEncoding.Descriptor instead.

func (EnumEncoding) Number added in v0.6.0

func (EnumEncoding) String added in v0.6.0

func (x EnumEncoding) String() string

func (EnumEncoding) Type added in v0.6.0

type Error added in v0.0.4

type Error struct {

	// Error message (e.g., "user not found", "database connection failed")
	Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
	// contains filtered or unexported fields
}

Error is returned when a handler encounters an error. It contains a simple error message that the developer can customize.

func (*Error) Descriptor deprecated added in v0.0.4

func (*Error) Descriptor() ([]byte, []int)

Deprecated: Use Error.ProtoReflect.Descriptor instead.

func (*Error) Error added in v0.0.6

func (e *Error) Error() string

Error implements the error interface for Error. This allows Error to be used with errors.As() and errors.Is().

func (*Error) GetMessage added in v0.0.4

func (x *Error) GetMessage() string

func (*Error) ProtoMessage added in v0.0.4

func (*Error) ProtoMessage()

func (*Error) ProtoReflect added in v0.0.4

func (x *Error) ProtoReflect() protoreflect.Message

func (*Error) Reset added in v0.0.4

func (x *Error) Reset()

func (*Error) String added in v0.0.4

func (x *Error) String() string

type FieldExamples

type FieldExamples struct {

	// List of example values for this field
	Values []string `protobuf:"bytes,1,rep,name=values,proto3" json:"values,omitempty"`
	// contains filtered or unexported fields
}

FieldExamples defines example values for a field

func (*FieldExamples) Descriptor deprecated

func (*FieldExamples) Descriptor() ([]byte, []int)

Deprecated: Use FieldExamples.ProtoReflect.Descriptor instead.

func (*FieldExamples) GetValues

func (x *FieldExamples) GetValues() []string

func (*FieldExamples) ProtoMessage

func (*FieldExamples) ProtoMessage()

func (*FieldExamples) ProtoReflect

func (x *FieldExamples) ProtoReflect() protoreflect.Message

func (*FieldExamples) Reset

func (x *FieldExamples) Reset()

func (*FieldExamples) String

func (x *FieldExamples) String() string

type FieldViolation added in v0.0.3

type FieldViolation struct {

	// The field path that failed validation (e.g., "user.email" for nested fields)
	// For header validation, this will be the header name (e.g., "X-API-Key")
	Field string `protobuf:"bytes,1,opt,name=field,proto3" json:"field,omitempty"`
	// Human-readable description of the validation violation
	// (e.g., "must be a valid email address", "required field missing")
	Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
	// contains filtered or unexported fields
}

FieldViolation describes a single validation error for a specific field.

func (*FieldViolation) Descriptor deprecated added in v0.0.3

func (*FieldViolation) Descriptor() ([]byte, []int)

Deprecated: Use FieldViolation.ProtoReflect.Descriptor instead.

func (*FieldViolation) GetDescription added in v0.0.3

func (x *FieldViolation) GetDescription() string

func (*FieldViolation) GetField added in v0.0.3

func (x *FieldViolation) GetField() string

func (*FieldViolation) ProtoMessage added in v0.0.3

func (*FieldViolation) ProtoMessage()

func (*FieldViolation) ProtoReflect added in v0.0.3

func (x *FieldViolation) ProtoReflect() protoreflect.Message

func (*FieldViolation) Reset added in v0.0.3

func (x *FieldViolation) Reset()

func (*FieldViolation) String added in v0.0.3

func (x *FieldViolation) String() string
type Header struct {

	// Name of the header parameter
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// Description of the header parameter
	Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
	// Type of the header parameter (string, integer, number, boolean, array)
	Type string `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"`
	// Whether the header is required
	Required bool `protobuf:"varint,4,opt,name=required,proto3" json:"required,omitempty"`
	// Schema format (e.g. "uuid", "email", "date-time")
	Format string `protobuf:"bytes,5,opt,name=format,proto3" json:"format,omitempty"`
	// Example value for the header
	Example string `protobuf:"bytes,6,opt,name=example,proto3" json:"example,omitempty"`
	// Whether the header is deprecated
	Deprecated bool `protobuf:"varint,7,opt,name=deprecated,proto3" json:"deprecated,omitempty"`
	// contains filtered or unexported fields
}

Header definition for OpenAPI specification

func (*Header) Descriptor deprecated

func (*Header) Descriptor() ([]byte, []int)

Deprecated: Use Header.ProtoReflect.Descriptor instead.

func (*Header) GetDeprecated

func (x *Header) GetDeprecated() bool

func (*Header) GetDescription

func (x *Header) GetDescription() string

func (*Header) GetExample

func (x *Header) GetExample() string

func (*Header) GetFormat

func (x *Header) GetFormat() string

func (*Header) GetName

func (x *Header) GetName() string

func (*Header) GetRequired

func (x *Header) GetRequired() bool

func (*Header) GetType

func (x *Header) GetType() string

func (*Header) ProtoMessage

func (*Header) ProtoMessage()

func (*Header) ProtoReflect

func (x *Header) ProtoReflect() protoreflect.Message

func (*Header) Reset

func (x *Header) Reset()

func (*Header) String

func (x *Header) String() string

type HttpConfig

type HttpConfig struct {

	// The HTTP path for this method (supports path variables like /users/{id})
	Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"`
	// The HTTP method (GET, POST, PUT, DELETE, PATCH). Defaults to POST if unspecified.
	Method HttpMethod `protobuf:"varint,2,opt,name=method,proto3,enum=sebuf.http.HttpMethod" json:"method,omitempty"`
	// When true, this method uses Server-Sent Events (SSE) for streaming responses.
	// The server sends events with Content-Type: text/event-stream.
	// Each event is the response message serialized as JSON in the SSE data field.
	Stream bool `protobuf:"varint,3,opt,name=stream,proto3" json:"stream,omitempty"`
	// contains filtered or unexported fields
}

HttpConfig defines HTTP-specific configuration for an RPC method

func (*HttpConfig) Descriptor deprecated

func (*HttpConfig) Descriptor() ([]byte, []int)

Deprecated: Use HttpConfig.ProtoReflect.Descriptor instead.

func (*HttpConfig) GetMethod added in v0.1.0

func (x *HttpConfig) GetMethod() HttpMethod

func (*HttpConfig) GetPath

func (x *HttpConfig) GetPath() string

func (*HttpConfig) GetStream added in v0.10.0

func (x *HttpConfig) GetStream() bool

func (*HttpConfig) ProtoMessage

func (*HttpConfig) ProtoMessage()

func (*HttpConfig) ProtoReflect

func (x *HttpConfig) ProtoReflect() protoreflect.Message

func (*HttpConfig) Reset

func (x *HttpConfig) Reset()

func (*HttpConfig) String

func (x *HttpConfig) String() string

type HttpMethod added in v0.1.0

type HttpMethod int32

HttpMethod specifies the HTTP verb for an RPC method

const (
	// Unspecified defaults to POST for backward compatibility
	HttpMethod_HTTP_METHOD_UNSPECIFIED HttpMethod = 0
	HttpMethod_HTTP_METHOD_GET         HttpMethod = 1
	HttpMethod_HTTP_METHOD_POST        HttpMethod = 2
	HttpMethod_HTTP_METHOD_PUT         HttpMethod = 3
	HttpMethod_HTTP_METHOD_DELETE      HttpMethod = 4
	HttpMethod_HTTP_METHOD_PATCH       HttpMethod = 5
)

func (HttpMethod) Descriptor added in v0.1.0

func (HttpMethod) Descriptor() protoreflect.EnumDescriptor

func (HttpMethod) Enum added in v0.1.0

func (x HttpMethod) Enum() *HttpMethod

func (HttpMethod) EnumDescriptor deprecated added in v0.1.0

func (HttpMethod) EnumDescriptor() ([]byte, []int)

Deprecated: Use HttpMethod.Descriptor instead.

func (HttpMethod) Number added in v0.1.0

func (x HttpMethod) Number() protoreflect.EnumNumber

func (HttpMethod) String added in v0.1.0

func (x HttpMethod) String() string

func (HttpMethod) Type added in v0.1.0

type Int64Encoding added in v0.6.0

type Int64Encoding int32

Int64Encoding controls how int64/uint64 fields serialize to JSON

const (
	// Follow protojson default (serialize as string)
	Int64Encoding_INT64_ENCODING_UNSPECIFIED Int64Encoding = 0
	// Explicit string encoding: "12345"
	Int64Encoding_INT64_ENCODING_STRING Int64Encoding = 1
	// Numeric encoding: 12345 (precision warning for values > 2^53)
	Int64Encoding_INT64_ENCODING_NUMBER Int64Encoding = 2
)

func (Int64Encoding) Descriptor added in v0.6.0

func (Int64Encoding) Enum added in v0.6.0

func (x Int64Encoding) Enum() *Int64Encoding

func (Int64Encoding) EnumDescriptor deprecated added in v0.6.0

func (Int64Encoding) EnumDescriptor() ([]byte, []int)

Deprecated: Use Int64Encoding.Descriptor instead.

func (Int64Encoding) Number added in v0.6.0

func (Int64Encoding) String added in v0.6.0

func (x Int64Encoding) String() string

func (Int64Encoding) Type added in v0.6.0

type MethodHeaders

type MethodHeaders struct {

	// List of required headers for this specific RPC
	RequiredHeaders []*Header `protobuf:"bytes,1,rep,name=required_headers,json=requiredHeaders,proto3" json:"required_headers,omitempty"`
	// contains filtered or unexported fields
}

Method-level headers configuration

func (*MethodHeaders) Descriptor deprecated

func (*MethodHeaders) Descriptor() ([]byte, []int)

Deprecated: Use MethodHeaders.ProtoReflect.Descriptor instead.

func (*MethodHeaders) GetRequiredHeaders

func (x *MethodHeaders) GetRequiredHeaders() []*Header

func (*MethodHeaders) ProtoMessage

func (*MethodHeaders) ProtoMessage()

func (*MethodHeaders) ProtoReflect

func (x *MethodHeaders) ProtoReflect() protoreflect.Message

func (*MethodHeaders) Reset

func (x *MethodHeaders) Reset()

func (*MethodHeaders) String

func (x *MethodHeaders) String() string

type OneofConfig added in v0.7.0

type OneofConfig struct {

	// The JSON field name for the discriminator (e.g., "type", "kind").
	// Required: if empty, the annotation is ignored.
	Discriminator string `protobuf:"bytes,1,opt,name=discriminator,proto3" json:"discriminator,omitempty"`
	// Whether to flatten variant message fields to the same level as the discriminator.
	// When true: variant's child fields are promoted to the parent object alongside the discriminator.
	// When false: variant stays nested under its field name with the discriminator alongside.
	// Requires all variant fields to be message types when true.
	Flatten bool `protobuf:"varint,2,opt,name=flatten,proto3" json:"flatten,omitempty"`
	// contains filtered or unexported fields
}

OneofConfig controls oneof serialization as a discriminated union. Applied to a oneof definition via (sebuf.http.oneof_config).

func (*OneofConfig) Descriptor deprecated added in v0.7.0

func (*OneofConfig) Descriptor() ([]byte, []int)

Deprecated: Use OneofConfig.ProtoReflect.Descriptor instead.

func (*OneofConfig) GetDiscriminator added in v0.7.0

func (x *OneofConfig) GetDiscriminator() string

func (*OneofConfig) GetFlatten added in v0.7.0

func (x *OneofConfig) GetFlatten() bool

func (*OneofConfig) ProtoMessage added in v0.7.0

func (*OneofConfig) ProtoMessage()

func (*OneofConfig) ProtoReflect added in v0.7.0

func (x *OneofConfig) ProtoReflect() protoreflect.Message

func (*OneofConfig) Reset added in v0.7.0

func (x *OneofConfig) Reset()

func (*OneofConfig) String added in v0.7.0

func (x *OneofConfig) String() string

type QueryConfig added in v0.1.0

type QueryConfig struct {

	// The query parameter name in the URL (e.g., "page_size" for ?page_size=10)
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// Whether this query parameter is required
	Required bool `protobuf:"varint,2,opt,name=required,proto3" json:"required,omitempty"`
	// contains filtered or unexported fields
}

QueryConfig defines query parameter configuration for a message field

func (*QueryConfig) Descriptor deprecated added in v0.1.0

func (*QueryConfig) Descriptor() ([]byte, []int)

Deprecated: Use QueryConfig.ProtoReflect.Descriptor instead.

func (*QueryConfig) GetName added in v0.1.0

func (x *QueryConfig) GetName() string

func (*QueryConfig) GetRequired added in v0.1.0

func (x *QueryConfig) GetRequired() bool

func (*QueryConfig) ProtoMessage added in v0.1.0

func (*QueryConfig) ProtoMessage()

func (*QueryConfig) ProtoReflect added in v0.1.0

func (x *QueryConfig) ProtoReflect() protoreflect.Message

func (*QueryConfig) Reset added in v0.1.0

func (x *QueryConfig) Reset()

func (*QueryConfig) String added in v0.1.0

func (x *QueryConfig) String() string

type ServiceConfig

type ServiceConfig struct {

	// Base path prefix for all methods in this service
	BasePath string `protobuf:"bytes,1,opt,name=base_path,json=basePath,proto3" json:"base_path,omitempty"`
	// contains filtered or unexported fields
}

ServiceConfig defines HTTP-specific configuration for an entire service

func (*ServiceConfig) Descriptor deprecated

func (*ServiceConfig) Descriptor() ([]byte, []int)

Deprecated: Use ServiceConfig.ProtoReflect.Descriptor instead.

func (*ServiceConfig) GetBasePath

func (x *ServiceConfig) GetBasePath() string

func (*ServiceConfig) ProtoMessage

func (*ServiceConfig) ProtoMessage()

func (*ServiceConfig) ProtoReflect

func (x *ServiceConfig) ProtoReflect() protoreflect.Message

func (*ServiceConfig) Reset

func (x *ServiceConfig) Reset()

func (*ServiceConfig) String

func (x *ServiceConfig) String() string

type ServiceHeaders

type ServiceHeaders struct {

	// List of required headers for all RPCs in the service
	RequiredHeaders []*Header `protobuf:"bytes,1,rep,name=required_headers,json=requiredHeaders,proto3" json:"required_headers,omitempty"`
	// contains filtered or unexported fields
}

Service-level headers configuration

func (*ServiceHeaders) Descriptor deprecated

func (*ServiceHeaders) Descriptor() ([]byte, []int)

Deprecated: Use ServiceHeaders.ProtoReflect.Descriptor instead.

func (*ServiceHeaders) GetRequiredHeaders

func (x *ServiceHeaders) GetRequiredHeaders() []*Header

func (*ServiceHeaders) ProtoMessage

func (*ServiceHeaders) ProtoMessage()

func (*ServiceHeaders) ProtoReflect

func (x *ServiceHeaders) ProtoReflect() protoreflect.Message

func (*ServiceHeaders) Reset

func (x *ServiceHeaders) Reset()

func (*ServiceHeaders) String

func (x *ServiceHeaders) String() string

type TimestampFormat added in v0.7.0

type TimestampFormat int32

TimestampFormat controls how google.protobuf.Timestamp fields serialize to JSON.

const (
	// Follow protojson default (RFC 3339 string: "2024-01-15T09:30:00Z")
	TimestampFormat_TIMESTAMP_FORMAT_UNSPECIFIED TimestampFormat = 0
	// Explicit RFC 3339 (same as default but self-documenting)
	TimestampFormat_TIMESTAMP_FORMAT_RFC3339 TimestampFormat = 1
	// Unix seconds as integer: 1705312200 (nanos truncated)
	TimestampFormat_TIMESTAMP_FORMAT_UNIX_SECONDS TimestampFormat = 2
	// Unix milliseconds as integer: 1705312200000 (sub-millisecond nanos truncated)
	TimestampFormat_TIMESTAMP_FORMAT_UNIX_MILLIS TimestampFormat = 3
	// Date-only string: "2024-01-15" (time component dropped, lossy)
	TimestampFormat_TIMESTAMP_FORMAT_DATE TimestampFormat = 4
)

func (TimestampFormat) Descriptor added in v0.7.0

func (TimestampFormat) Enum added in v0.7.0

func (x TimestampFormat) Enum() *TimestampFormat

func (TimestampFormat) EnumDescriptor deprecated added in v0.7.0

func (TimestampFormat) EnumDescriptor() ([]byte, []int)

Deprecated: Use TimestampFormat.Descriptor instead.

func (TimestampFormat) Number added in v0.7.0

func (TimestampFormat) String added in v0.7.0

func (x TimestampFormat) String() string

func (TimestampFormat) Type added in v0.7.0

type ValidationError added in v0.0.3

type ValidationError struct {

	// List of validation violations
	Violations []*FieldViolation `protobuf:"bytes,1,rep,name=violations,proto3" json:"violations,omitempty"`
	// contains filtered or unexported fields
}

ValidationError is returned when request validation fails. It contains a list of field violations describing what went wrong.

func (*ValidationError) Descriptor deprecated added in v0.0.3

func (*ValidationError) Descriptor() ([]byte, []int)

Deprecated: Use ValidationError.ProtoReflect.Descriptor instead.

func (*ValidationError) Error added in v0.0.6

func (e *ValidationError) Error() string

Error implements the error interface for ValidationError. This allows ValidationError to be used with errors.As() and errors.Is().

func (*ValidationError) GetViolations added in v0.0.3

func (x *ValidationError) GetViolations() []*FieldViolation

func (*ValidationError) ProtoMessage added in v0.0.3

func (*ValidationError) ProtoMessage()

func (*ValidationError) ProtoReflect added in v0.0.3

func (x *ValidationError) ProtoReflect() protoreflect.Message

func (*ValidationError) Reset added in v0.0.3

func (x *ValidationError) Reset()

func (*ValidationError) String added in v0.0.3

func (x *ValidationError) String() string

Jump to

Keyboard shortcuts

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