v1

package
v0.0.0-...-2ef827d Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2024 License: MIT Imports: 27 Imported by: 3

Documentation

Index

Constants

View Source
const (
	Registry_Register_FullMethodName           = "/core.registry.v1.Registry/Register"
	Registry_RegisterGrpcServer_FullMethodName = "/core.registry.v1.Registry/RegisterGrpcServer"
	Registry_RegisterHttpServer_FullMethodName = "/core.registry.v1.Registry/RegisterHttpServer"
	Registry_RegisterConsumers_FullMethodName  = "/core.registry.v1.Registry/RegisterConsumers"
	Registry_Connection_FullMethodName         = "/core.registry.v1.Registry/Connection"
)

Variables

View Source
var (
	ServiceStatus_name = map[int32]string{
		0: "SERVICE_STATUS_UNSPECIFIED",
		1: "SERVICE_STATUS_REGISTERED",
		2: "SERVICE_STATUS_DEREGISTERED",
		3: "SERVICE_STATUS_HEALTHY",
		4: "SERVICE_STATUS_UNHEALTHY",
	}
	ServiceStatus_value = map[string]int32{
		"SERVICE_STATUS_UNSPECIFIED":  0,
		"SERVICE_STATUS_REGISTERED":   1,
		"SERVICE_STATUS_DEREGISTERED": 2,
		"SERVICE_STATUS_HEALTHY":      3,
		"SERVICE_STATUS_UNHEALTHY":    4,
	}
)

Enum value maps for ServiceStatus.

View Source
var (
	ServerKind_name = map[int32]string{
		0: "SERVER_KIND_UNSPECIFIED",
		1: "SERVER_KIND_GRPC",
		2: "SERVER_KIND_HTTP",
	}
	ServerKind_value = map[string]int32{
		"SERVER_KIND_UNSPECIFIED": 0,
		"SERVER_KIND_GRPC":        1,
		"SERVER_KIND_HTTP":        2,
	}
)

Enum value maps for ServerKind.

View Source
var (
	ConsumerKind_name = map[int32]string{
		0: "CONSUMER_KIND_UNSPECIFIED",
		1: "CONSUMER_KIND_ONE",
		2: "CONSUMER_KIND_ALL",
	}
	ConsumerKind_value = map[string]int32{
		"CONSUMER_KIND_UNSPECIFIED": 0,
		"CONSUMER_KIND_ONE":         1,
		"CONSUMER_KIND_ALL":         2,
	}
)

Enum value maps for ConsumerKind.

View Source
var (
	Status_name = map[int32]string{
		0: "STATUS_INVALID_UNSPECIFIED",
		1: "STATUS_HEALTHY",
		2: "STATUS_UNHEALTHY",
	}
	Status_value = map[string]int32{
		"STATUS_INVALID_UNSPECIFIED": 0,
		"STATUS_HEALTHY":             1,
		"STATUS_UNHEALTHY":           2,
	}
)

Enum value maps for Status.

View Source
var File_core_registry_v1_models_proto protoreflect.FileDescriptor
View Source
var File_core_registry_v1_services_proto protoreflect.FileDescriptor
View Source
var Registry_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "core.registry.v1.Registry",
	HandlerType: (*RegistryServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Register",
			Handler:    _Registry_Register_Handler,
		},
		{
			MethodName: "RegisterGrpcServer",
			Handler:    _Registry_RegisterGrpcServer_Handler,
		},
		{
			MethodName: "RegisterHttpServer",
			Handler:    _Registry_RegisterHttpServer_Handler,
		},
		{
			MethodName: "RegisterConsumers",
			Handler:    _Registry_RegisterConsumers_Handler,
		},
		{
			MethodName: "Connection",
			Handler:    _Registry_Connection_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "core/registry/v1/services.proto",
}

Registry_ServiceDesc is the grpc.ServiceDesc for Registry service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func DefaultDeleteConsumer

func DefaultDeleteConsumer(ctx context.Context, in *Consumer, db *gorm.DB) error

func DefaultDeleteConsumerSet

func DefaultDeleteConsumerSet(ctx context.Context, in []*Consumer, db *gorm.DB) error

func DefaultDeleteRegistration

func DefaultDeleteRegistration(ctx context.Context, in *Registration, db *gorm.DB) error

func DefaultDeleteRegistrationSet

func DefaultDeleteRegistrationSet(ctx context.Context, in []*Registration, db *gorm.DB) error

func DefaultDeleteServer

func DefaultDeleteServer(ctx context.Context, in *Server, db *gorm.DB) error

func DefaultDeleteServerSet

func DefaultDeleteServerSet(ctx context.Context, in []*Server, db *gorm.DB) error

func RegisterRegistryServer

func RegisterRegistryServer(s grpc.ServiceRegistrar, srv RegistryServer)

Types

type ConnectionRequest

type ConnectionRequest struct {
	Route string `protobuf:"bytes,1,opt,name=route,proto3" json:"route,omitempty"`
	// contains filtered or unexported fields
}

func (*ConnectionRequest) Descriptor deprecated

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

Deprecated: Use ConnectionRequest.ProtoReflect.Descriptor instead.

func (*ConnectionRequest) GetRoute

func (x *ConnectionRequest) GetRoute() string

func (*ConnectionRequest) ProtoMessage

func (*ConnectionRequest) ProtoMessage()

func (*ConnectionRequest) ProtoReflect

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

func (*ConnectionRequest) Reset

func (x *ConnectionRequest) Reset()

func (*ConnectionRequest) String

func (x *ConnectionRequest) String() string

func (*ConnectionRequest) Validate

func (m *ConnectionRequest) Validate() error

Validate checks the field values on ConnectionRequest with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*ConnectionRequest) ValidateAll

func (m *ConnectionRequest) ValidateAll() error

ValidateAll checks the field values on ConnectionRequest with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in ConnectionRequestMultiError, or nil if none found.

type ConnectionRequestMultiError

type ConnectionRequestMultiError []error

ConnectionRequestMultiError is an error wrapping multiple validation errors returned by ConnectionRequest.ValidateAll() if the designated constraints aren't met.

func (ConnectionRequestMultiError) AllErrors

func (m ConnectionRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (ConnectionRequestMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type ConnectionRequestValidationError

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

ConnectionRequestValidationError is the validation error returned by ConnectionRequest.Validate if the designated constraints aren't met.

func (ConnectionRequestValidationError) Cause

Cause function returns cause value.

func (ConnectionRequestValidationError) Error

Error satisfies the builtin error interface

func (ConnectionRequestValidationError) ErrorName

ErrorName returns error name.

func (ConnectionRequestValidationError) Field

Field function returns field value.

func (ConnectionRequestValidationError) Key

Key function returns key value.

func (ConnectionRequestValidationError) Reason

Reason function returns reason value.

type ConnectionResponse

type ConnectionResponse struct {
	Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
	Status  Status `protobuf:"varint,3,opt,name=status,proto3,enum=core.registry.v1.Status" json:"status,omitempty"`
	// contains filtered or unexported fields
}

func (*ConnectionResponse) Descriptor deprecated

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

Deprecated: Use ConnectionResponse.ProtoReflect.Descriptor instead.

func (*ConnectionResponse) GetAddress

func (x *ConnectionResponse) GetAddress() string

func (*ConnectionResponse) GetStatus

func (x *ConnectionResponse) GetStatus() Status

func (*ConnectionResponse) ProtoMessage

func (*ConnectionResponse) ProtoMessage()

func (*ConnectionResponse) ProtoReflect

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

func (*ConnectionResponse) Reset

func (x *ConnectionResponse) Reset()

func (*ConnectionResponse) String

func (x *ConnectionResponse) String() string

func (*ConnectionResponse) Validate

func (m *ConnectionResponse) Validate() error

Validate checks the field values on ConnectionResponse with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*ConnectionResponse) ValidateAll

func (m *ConnectionResponse) ValidateAll() error

ValidateAll checks the field values on ConnectionResponse with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in ConnectionResponseMultiError, or nil if none found.

type ConnectionResponseMultiError

type ConnectionResponseMultiError []error

ConnectionResponseMultiError is an error wrapping multiple validation errors returned by ConnectionResponse.ValidateAll() if the designated constraints aren't met.

func (ConnectionResponseMultiError) AllErrors

func (m ConnectionResponseMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (ConnectionResponseMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type ConnectionResponseValidationError

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

ConnectionResponseValidationError is the validation error returned by ConnectionResponse.Validate if the designated constraints aren't met.

func (ConnectionResponseValidationError) Cause

Cause function returns cause value.

func (ConnectionResponseValidationError) Error

Error satisfies the builtin error interface

func (ConnectionResponseValidationError) ErrorName

ErrorName returns error name.

func (ConnectionResponseValidationError) Field

Field function returns field value.

func (ConnectionResponseValidationError) Key

Key function returns key value.

func (ConnectionResponseValidationError) Reason

Reason function returns reason value.

type Consumer

type Consumer struct {

	// the table primary key
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// event_source is the source of events the consumer is listening for
	EventSource string `protobuf:"bytes,2,opt,name=event_source,json=eventSource,proto3" json:"event_source,omitempty"`
	// event_type is the type of event the consumer is listening for: when empty, the consumer is listening for all events
	// of the given event_source
	EventType string       `protobuf:"bytes,3,opt,name=event_type,json=eventType,proto3" json:"event_type,omitempty"`
	Kind      ConsumerKind `protobuf:"varint,4,opt,name=kind,proto3,enum=core.registry.v1.ConsumerKind" json:"kind,omitempty"`
	// contains filtered or unexported fields
}

func DefaultApplyFieldMaskConsumer

func DefaultApplyFieldMaskConsumer(ctx context.Context, patchee *Consumer, patcher *Consumer, updateMask *field_mask.FieldMask, prefix string, db *gorm.DB) (*Consumer, error)

DefaultApplyFieldMaskConsumer patches an pbObject with patcher according to a field mask.

func DefaultCreateConsumer

func DefaultCreateConsumer(ctx context.Context, in *Consumer, db *gorm.DB) (*Consumer, error)

DefaultCreateConsumer executes a basic gorm create call

func DefaultListConsumer

func DefaultListConsumer(ctx context.Context, db *gorm.DB) ([]*Consumer, error)

DefaultListConsumer executes a gorm list call

func DefaultPatchConsumer

func DefaultPatchConsumer(ctx context.Context, in *Consumer, updateMask *field_mask.FieldMask, db *gorm.DB) (*Consumer, error)

DefaultPatchConsumer executes a basic gorm update call with patch behavior

func DefaultPatchSetConsumer

func DefaultPatchSetConsumer(ctx context.Context, objects []*Consumer, updateMasks []*field_mask.FieldMask, db *gorm.DB) ([]*Consumer, error)

DefaultPatchSetConsumer executes a bulk gorm update call with patch behavior

func DefaultReadConsumer

func DefaultReadConsumer(ctx context.Context, in *Consumer, db *gorm.DB) (*Consumer, error)

func DefaultStrictUpdateConsumer

func DefaultStrictUpdateConsumer(ctx context.Context, in *Consumer, db *gorm.DB) (*Consumer, error)

DefaultStrictUpdateConsumer clears / replaces / appends first level 1:many children and then executes a gorm update call

func (*Consumer) Descriptor deprecated

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

Deprecated: Use Consumer.ProtoReflect.Descriptor instead.

func (*Consumer) GetEventSource

func (x *Consumer) GetEventSource() string

func (*Consumer) GetEventType

func (x *Consumer) GetEventType() string

func (*Consumer) GetId

func (x *Consumer) GetId() string

func (*Consumer) GetKind

func (x *Consumer) GetKind() ConsumerKind

func (*Consumer) ProtoMessage

func (*Consumer) ProtoMessage()

func (*Consumer) ProtoReflect

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

func (*Consumer) Reset

func (x *Consumer) Reset()

func (*Consumer) String

func (x *Consumer) String() string

func (*Consumer) ToORM

func (m *Consumer) ToORM(ctx context.Context) (ConsumerORM, error)

ToORM runs the BeforeToORM hook if present, converts the fields of this object to ORM format, runs the AfterToORM hook, then returns the ORM object

func (*Consumer) Validate

func (m *Consumer) Validate() error

Validate checks the field values on Consumer with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*Consumer) ValidateAll

func (m *Consumer) ValidateAll() error

ValidateAll checks the field values on Consumer with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in ConsumerMultiError, or nil if none found.

type ConsumerKind

type ConsumerKind int32
const (
	ConsumerKind_CONSUMER_KIND_UNSPECIFIED ConsumerKind = 0
	// CONSUMER_KIND_ONE means that only one replica of the microservice will consume the event
	ConsumerKind_CONSUMER_KIND_ONE ConsumerKind = 1
	// CONSUMER_KIND_ALL means that all replicas of the microservice will consume the event
	ConsumerKind_CONSUMER_KIND_ALL ConsumerKind = 2
)

func (ConsumerKind) Descriptor

func (ConsumerKind) Enum

func (x ConsumerKind) Enum() *ConsumerKind

func (ConsumerKind) EnumDescriptor deprecated

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

Deprecated: Use ConsumerKind.Descriptor instead.

func (ConsumerKind) Number

func (ConsumerKind) String

func (x ConsumerKind) String() string

func (ConsumerKind) Type

type ConsumerMultiError

type ConsumerMultiError []error

ConsumerMultiError is an error wrapping multiple validation errors returned by Consumer.ValidateAll() if the designated constraints aren't met.

func (ConsumerMultiError) AllErrors

func (m ConsumerMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (ConsumerMultiError) Error

func (m ConsumerMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type ConsumerORM

type ConsumerORM struct {
	EventSource string
	EventType   string
	Id          string `gorm:"type:uuid;primary_key"`
	Kind        int32
}

func (ConsumerORM) TableName

func (ConsumerORM) TableName() string

TableName overrides the default tablename generated by GORM

func (*ConsumerORM) ToPB

func (m *ConsumerORM) ToPB(ctx context.Context) (Consumer, error)

ToPB runs the BeforeToPB hook if present, converts the fields of this object to PB format, runs the AfterToPB hook, then returns the PB object

type ConsumerORMWithAfterCreate_

type ConsumerORMWithAfterCreate_ interface {
	AfterCreate_(context.Context, *gorm.DB) error
}

type ConsumerORMWithAfterDeleteSet

type ConsumerORMWithAfterDeleteSet interface {
	AfterDeleteSet(context.Context, []*Consumer, *gorm.DB) error
}

type ConsumerORMWithAfterDelete_

type ConsumerORMWithAfterDelete_ interface {
	AfterDelete_(context.Context, *gorm.DB) error
}

type ConsumerORMWithAfterListFind

type ConsumerORMWithAfterListFind interface {
	AfterListFind(context.Context, *gorm.DB, *[]ConsumerORM) error
}

type ConsumerORMWithAfterReadFind

type ConsumerORMWithAfterReadFind interface {
	AfterReadFind(context.Context, *gorm.DB) error
}

type ConsumerORMWithAfterStrictUpdateSave

type ConsumerORMWithAfterStrictUpdateSave interface {
	AfterStrictUpdateSave(context.Context, *gorm.DB) error
}

type ConsumerORMWithBeforeCreate_

type ConsumerORMWithBeforeCreate_ interface {
	BeforeCreate_(context.Context, *gorm.DB) (*gorm.DB, error)
}

type ConsumerORMWithBeforeDeleteSet

type ConsumerORMWithBeforeDeleteSet interface {
	BeforeDeleteSet(context.Context, []*Consumer, *gorm.DB) (*gorm.DB, error)
}

type ConsumerORMWithBeforeDelete_

type ConsumerORMWithBeforeDelete_ interface {
	BeforeDelete_(context.Context, *gorm.DB) (*gorm.DB, error)
}

type ConsumerORMWithBeforeListApplyQuery

type ConsumerORMWithBeforeListApplyQuery interface {
	BeforeListApplyQuery(context.Context, *gorm.DB) (*gorm.DB, error)
}

type ConsumerORMWithBeforeListFind

type ConsumerORMWithBeforeListFind interface {
	BeforeListFind(context.Context, *gorm.DB) (*gorm.DB, error)
}

type ConsumerORMWithBeforeReadApplyQuery

type ConsumerORMWithBeforeReadApplyQuery interface {
	BeforeReadApplyQuery(context.Context, *gorm.DB) (*gorm.DB, error)
}

type ConsumerORMWithBeforeReadFind

type ConsumerORMWithBeforeReadFind interface {
	BeforeReadFind(context.Context, *gorm.DB) (*gorm.DB, error)
}

type ConsumerORMWithBeforeStrictUpdateCleanup

type ConsumerORMWithBeforeStrictUpdateCleanup interface {
	BeforeStrictUpdateCleanup(context.Context, *gorm.DB) (*gorm.DB, error)
}

type ConsumerORMWithBeforeStrictUpdateSave

type ConsumerORMWithBeforeStrictUpdateSave interface {
	BeforeStrictUpdateSave(context.Context, *gorm.DB) (*gorm.DB, error)
}

type ConsumerRequest

type ConsumerRequest struct {

	// kind is the type of consumer (one or all)
	Kind ConsumerKind `protobuf:"varint,1,opt,name=kind,proto3,enum=core.registry.v1.ConsumerKind" json:"kind,omitempty"`
	// event_source is the source of events the consumer is listening for
	EventSource string `protobuf:"bytes,2,opt,name=event_source,json=eventSource,proto3" json:"event_source,omitempty"`
	// event_type is the type of event the consumer is listening for: when empty, the consumer is listening for all events
	// of the given event_source
	EventType *string `protobuf:"bytes,3,opt,name=event_type,json=eventType,proto3,oneof" json:"event_type,omitempty"`
	// contains filtered or unexported fields
}

func (*ConsumerRequest) Descriptor deprecated

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

Deprecated: Use ConsumerRequest.ProtoReflect.Descriptor instead.

func (*ConsumerRequest) GetEventSource

func (x *ConsumerRequest) GetEventSource() string

func (*ConsumerRequest) GetEventType

func (x *ConsumerRequest) GetEventType() string

func (*ConsumerRequest) GetKind

func (x *ConsumerRequest) GetKind() ConsumerKind

func (*ConsumerRequest) ProtoMessage

func (*ConsumerRequest) ProtoMessage()

func (*ConsumerRequest) ProtoReflect

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

func (*ConsumerRequest) Reset

func (x *ConsumerRequest) Reset()

func (*ConsumerRequest) String

func (x *ConsumerRequest) String() string

func (*ConsumerRequest) Validate

func (m *ConsumerRequest) Validate() error

Validate checks the field values on ConsumerRequest with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*ConsumerRequest) ValidateAll

func (m *ConsumerRequest) ValidateAll() error

ValidateAll checks the field values on ConsumerRequest with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in ConsumerRequestMultiError, or nil if none found.

type ConsumerRequestMultiError

type ConsumerRequestMultiError []error

ConsumerRequestMultiError is an error wrapping multiple validation errors returned by ConsumerRequest.ValidateAll() if the designated constraints aren't met.

func (ConsumerRequestMultiError) AllErrors

func (m ConsumerRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (ConsumerRequestMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type ConsumerRequestValidationError

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

ConsumerRequestValidationError is the validation error returned by ConsumerRequest.Validate if the designated constraints aren't met.

func (ConsumerRequestValidationError) Cause

Cause function returns cause value.

func (ConsumerRequestValidationError) Error

Error satisfies the builtin error interface

func (ConsumerRequestValidationError) ErrorName

func (e ConsumerRequestValidationError) ErrorName() string

ErrorName returns error name.

func (ConsumerRequestValidationError) Field

Field function returns field value.

func (ConsumerRequestValidationError) Key

Key function returns key value.

func (ConsumerRequestValidationError) Reason

Reason function returns reason value.

type ConsumerValidationError

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

ConsumerValidationError is the validation error returned by Consumer.Validate if the designated constraints aren't met.

func (ConsumerValidationError) Cause

func (e ConsumerValidationError) Cause() error

Cause function returns cause value.

func (ConsumerValidationError) Error

func (e ConsumerValidationError) Error() string

Error satisfies the builtin error interface

func (ConsumerValidationError) ErrorName

func (e ConsumerValidationError) ErrorName() string

ErrorName returns error name.

func (ConsumerValidationError) Field

func (e ConsumerValidationError) Field() string

Field function returns field value.

func (ConsumerValidationError) Key

func (e ConsumerValidationError) Key() bool

Key function returns key value.

func (ConsumerValidationError) Reason

func (e ConsumerValidationError) Reason() string

Reason function returns reason value.

type ConsumerWithAfterPatchSave

type ConsumerWithAfterPatchSave interface {
	AfterPatchSave(context.Context, *Consumer, *field_mask.FieldMask, *gorm.DB) error
}

type ConsumerWithAfterToORM

type ConsumerWithAfterToORM interface {
	AfterToORM(context.Context, *ConsumerORM) error
}

ConsumerAfterToORM called after default ToORM code

type ConsumerWithAfterToPB

type ConsumerWithAfterToPB interface {
	AfterToPB(context.Context, *Consumer) error
}

ConsumerAfterToPB called after default ToPB code

type ConsumerWithBeforePatchApplyFieldMask

type ConsumerWithBeforePatchApplyFieldMask interface {
	BeforePatchApplyFieldMask(context.Context, *Consumer, *field_mask.FieldMask, *gorm.DB) (*gorm.DB, error)
}

type ConsumerWithBeforePatchRead

type ConsumerWithBeforePatchRead interface {
	BeforePatchRead(context.Context, *Consumer, *field_mask.FieldMask, *gorm.DB) (*gorm.DB, error)
}

type ConsumerWithBeforePatchSave

type ConsumerWithBeforePatchSave interface {
	BeforePatchSave(context.Context, *Consumer, *field_mask.FieldMask, *gorm.DB) (*gorm.DB, error)
}

type ConsumerWithBeforeToORM

type ConsumerWithBeforeToORM interface {
	BeforeToORM(context.Context, *ConsumerORM) error
}

ConsumerBeforeToORM called before default ToORM code

type ConsumerWithBeforeToPB

type ConsumerWithBeforeToPB interface {
	BeforeToPB(context.Context, *Consumer) error
}

ConsumerBeforeToPB called before default ToPB code

type RegisterConsumersRequest

type RegisterConsumersRequest struct {
	Id        string             `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Consumers []*ConsumerRequest `protobuf:"bytes,2,rep,name=consumers,proto3" json:"consumers,omitempty"`
	// contains filtered or unexported fields
}

func (*RegisterConsumersRequest) Descriptor deprecated

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

Deprecated: Use RegisterConsumersRequest.ProtoReflect.Descriptor instead.

func (*RegisterConsumersRequest) GetConsumers

func (x *RegisterConsumersRequest) GetConsumers() []*ConsumerRequest

func (*RegisterConsumersRequest) GetId

func (x *RegisterConsumersRequest) GetId() string

func (*RegisterConsumersRequest) ProtoMessage

func (*RegisterConsumersRequest) ProtoMessage()

func (*RegisterConsumersRequest) ProtoReflect

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

func (*RegisterConsumersRequest) Reset

func (x *RegisterConsumersRequest) Reset()

func (*RegisterConsumersRequest) String

func (x *RegisterConsumersRequest) String() string

func (*RegisterConsumersRequest) Validate

func (m *RegisterConsumersRequest) Validate() error

Validate checks the field values on RegisterConsumersRequest with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*RegisterConsumersRequest) ValidateAll

func (m *RegisterConsumersRequest) ValidateAll() error

ValidateAll checks the field values on RegisterConsumersRequest with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in RegisterConsumersRequestMultiError, or nil if none found.

type RegisterConsumersRequestMultiError

type RegisterConsumersRequestMultiError []error

RegisterConsumersRequestMultiError is an error wrapping multiple validation errors returned by RegisterConsumersRequest.ValidateAll() if the designated constraints aren't met.

func (RegisterConsumersRequestMultiError) AllErrors

func (m RegisterConsumersRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (RegisterConsumersRequestMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type RegisterConsumersRequestValidationError

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

RegisterConsumersRequestValidationError is the validation error returned by RegisterConsumersRequest.Validate if the designated constraints aren't met.

func (RegisterConsumersRequestValidationError) Cause

Cause function returns cause value.

func (RegisterConsumersRequestValidationError) Error

Error satisfies the builtin error interface

func (RegisterConsumersRequestValidationError) ErrorName

ErrorName returns error name.

func (RegisterConsumersRequestValidationError) Field

Field function returns field value.

func (RegisterConsumersRequestValidationError) Key

Key function returns key value.

func (RegisterConsumersRequestValidationError) Reason

Reason function returns reason value.

type RegisterConsumersResponse

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

func (*RegisterConsumersResponse) Descriptor deprecated

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

Deprecated: Use RegisterConsumersResponse.ProtoReflect.Descriptor instead.

func (*RegisterConsumersResponse) ProtoMessage

func (*RegisterConsumersResponse) ProtoMessage()

func (*RegisterConsumersResponse) ProtoReflect

func (*RegisterConsumersResponse) Reset

func (x *RegisterConsumersResponse) Reset()

func (*RegisterConsumersResponse) String

func (x *RegisterConsumersResponse) String() string

func (*RegisterConsumersResponse) Validate

func (m *RegisterConsumersResponse) Validate() error

Validate checks the field values on RegisterConsumersResponse with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*RegisterConsumersResponse) ValidateAll

func (m *RegisterConsumersResponse) ValidateAll() error

ValidateAll checks the field values on RegisterConsumersResponse with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in RegisterConsumersResponseMultiError, or nil if none found.

type RegisterConsumersResponseMultiError

type RegisterConsumersResponseMultiError []error

RegisterConsumersResponseMultiError is an error wrapping multiple validation errors returned by RegisterConsumersResponse.ValidateAll() if the designated constraints aren't met.

func (RegisterConsumersResponseMultiError) AllErrors

AllErrors returns a list of validation violation errors.

func (RegisterConsumersResponseMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type RegisterConsumersResponseValidationError

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

RegisterConsumersResponseValidationError is the validation error returned by RegisterConsumersResponse.Validate if the designated constraints aren't met.

func (RegisterConsumersResponseValidationError) Cause

Cause function returns cause value.

func (RegisterConsumersResponseValidationError) Error

Error satisfies the builtin error interface

func (RegisterConsumersResponseValidationError) ErrorName

ErrorName returns error name.

func (RegisterConsumersResponseValidationError) Field

Field function returns field value.

func (RegisterConsumersResponseValidationError) Key

Key function returns key value.

func (RegisterConsumersResponseValidationError) Reason

Reason function returns reason value.

type RegisterGrpcServerRequest

type RegisterGrpcServerRequest struct {
	Id    string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Route string `protobuf:"bytes,2,opt,name=route,proto3" json:"route,omitempty"`
	// contains filtered or unexported fields
}

func (*RegisterGrpcServerRequest) Descriptor deprecated

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

Deprecated: Use RegisterGrpcServerRequest.ProtoReflect.Descriptor instead.

func (*RegisterGrpcServerRequest) GetId

func (x *RegisterGrpcServerRequest) GetId() string

func (*RegisterGrpcServerRequest) GetRoute

func (x *RegisterGrpcServerRequest) GetRoute() string

func (*RegisterGrpcServerRequest) ProtoMessage

func (*RegisterGrpcServerRequest) ProtoMessage()

func (*RegisterGrpcServerRequest) ProtoReflect

func (*RegisterGrpcServerRequest) Reset

func (x *RegisterGrpcServerRequest) Reset()

func (*RegisterGrpcServerRequest) String

func (x *RegisterGrpcServerRequest) String() string

func (*RegisterGrpcServerRequest) Validate

func (m *RegisterGrpcServerRequest) Validate() error

Validate checks the field values on RegisterGrpcServerRequest with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*RegisterGrpcServerRequest) ValidateAll

func (m *RegisterGrpcServerRequest) ValidateAll() error

ValidateAll checks the field values on RegisterGrpcServerRequest with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in RegisterGrpcServerRequestMultiError, or nil if none found.

type RegisterGrpcServerRequestMultiError

type RegisterGrpcServerRequestMultiError []error

RegisterGrpcServerRequestMultiError is an error wrapping multiple validation errors returned by RegisterGrpcServerRequest.ValidateAll() if the designated constraints aren't met.

func (RegisterGrpcServerRequestMultiError) AllErrors

AllErrors returns a list of validation violation errors.

func (RegisterGrpcServerRequestMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type RegisterGrpcServerRequestValidationError

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

RegisterGrpcServerRequestValidationError is the validation error returned by RegisterGrpcServerRequest.Validate if the designated constraints aren't met.

func (RegisterGrpcServerRequestValidationError) Cause

Cause function returns cause value.

func (RegisterGrpcServerRequestValidationError) Error

Error satisfies the builtin error interface

func (RegisterGrpcServerRequestValidationError) ErrorName

ErrorName returns error name.

func (RegisterGrpcServerRequestValidationError) Field

Field function returns field value.

func (RegisterGrpcServerRequestValidationError) Key

Key function returns key value.

func (RegisterGrpcServerRequestValidationError) Reason

Reason function returns reason value.

type RegisterGrpcServerResponse

type RegisterGrpcServerResponse struct {
	Port string `protobuf:"bytes,1,opt,name=port,proto3" json:"port,omitempty"`
	// contains filtered or unexported fields
}

func (*RegisterGrpcServerResponse) Descriptor deprecated

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

Deprecated: Use RegisterGrpcServerResponse.ProtoReflect.Descriptor instead.

func (*RegisterGrpcServerResponse) GetPort

func (x *RegisterGrpcServerResponse) GetPort() string

func (*RegisterGrpcServerResponse) ProtoMessage

func (*RegisterGrpcServerResponse) ProtoMessage()

func (*RegisterGrpcServerResponse) ProtoReflect

func (*RegisterGrpcServerResponse) Reset

func (x *RegisterGrpcServerResponse) Reset()

func (*RegisterGrpcServerResponse) String

func (x *RegisterGrpcServerResponse) String() string

func (*RegisterGrpcServerResponse) Validate

func (m *RegisterGrpcServerResponse) Validate() error

Validate checks the field values on RegisterGrpcServerResponse with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*RegisterGrpcServerResponse) ValidateAll

func (m *RegisterGrpcServerResponse) ValidateAll() error

ValidateAll checks the field values on RegisterGrpcServerResponse with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in RegisterGrpcServerResponseMultiError, or nil if none found.

type RegisterGrpcServerResponseMultiError

type RegisterGrpcServerResponseMultiError []error

RegisterGrpcServerResponseMultiError is an error wrapping multiple validation errors returned by RegisterGrpcServerResponse.ValidateAll() if the designated constraints aren't met.

func (RegisterGrpcServerResponseMultiError) AllErrors

AllErrors returns a list of validation violation errors.

func (RegisterGrpcServerResponseMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type RegisterGrpcServerResponseValidationError

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

RegisterGrpcServerResponseValidationError is the validation error returned by RegisterGrpcServerResponse.Validate if the designated constraints aren't met.

func (RegisterGrpcServerResponseValidationError) Cause

Cause function returns cause value.

func (RegisterGrpcServerResponseValidationError) Error

Error satisfies the builtin error interface

func (RegisterGrpcServerResponseValidationError) ErrorName

ErrorName returns error name.

func (RegisterGrpcServerResponseValidationError) Field

Field function returns field value.

func (RegisterGrpcServerResponseValidationError) Key

Key function returns key value.

func (RegisterGrpcServerResponseValidationError) Reason

Reason function returns reason value.

type RegisterHttpServerRequest

type RegisterHttpServerRequest struct {
	Id    string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Route string `protobuf:"bytes,2,opt,name=route,proto3" json:"route,omitempty"`
	// contains filtered or unexported fields
}

func (*RegisterHttpServerRequest) Descriptor deprecated

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

Deprecated: Use RegisterHttpServerRequest.ProtoReflect.Descriptor instead.

func (*RegisterHttpServerRequest) GetId

func (x *RegisterHttpServerRequest) GetId() string

func (*RegisterHttpServerRequest) GetRoute

func (x *RegisterHttpServerRequest) GetRoute() string

func (*RegisterHttpServerRequest) ProtoMessage

func (*RegisterHttpServerRequest) ProtoMessage()

func (*RegisterHttpServerRequest) ProtoReflect

func (*RegisterHttpServerRequest) Reset

func (x *RegisterHttpServerRequest) Reset()

func (*RegisterHttpServerRequest) String

func (x *RegisterHttpServerRequest) String() string

func (*RegisterHttpServerRequest) Validate

func (m *RegisterHttpServerRequest) Validate() error

Validate checks the field values on RegisterHttpServerRequest with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*RegisterHttpServerRequest) ValidateAll

func (m *RegisterHttpServerRequest) ValidateAll() error

ValidateAll checks the field values on RegisterHttpServerRequest with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in RegisterHttpServerRequestMultiError, or nil if none found.

type RegisterHttpServerRequestMultiError

type RegisterHttpServerRequestMultiError []error

RegisterHttpServerRequestMultiError is an error wrapping multiple validation errors returned by RegisterHttpServerRequest.ValidateAll() if the designated constraints aren't met.

func (RegisterHttpServerRequestMultiError) AllErrors

AllErrors returns a list of validation violation errors.

func (RegisterHttpServerRequestMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type RegisterHttpServerRequestValidationError

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

RegisterHttpServerRequestValidationError is the validation error returned by RegisterHttpServerRequest.Validate if the designated constraints aren't met.

func (RegisterHttpServerRequestValidationError) Cause

Cause function returns cause value.

func (RegisterHttpServerRequestValidationError) Error

Error satisfies the builtin error interface

func (RegisterHttpServerRequestValidationError) ErrorName

ErrorName returns error name.

func (RegisterHttpServerRequestValidationError) Field

Field function returns field value.

func (RegisterHttpServerRequestValidationError) Key

Key function returns key value.

func (RegisterHttpServerRequestValidationError) Reason

Reason function returns reason value.

type RegisterHttpServerResponse

type RegisterHttpServerResponse struct {
	Port string `protobuf:"bytes,1,opt,name=port,proto3" json:"port,omitempty"`
	// contains filtered or unexported fields
}

func (*RegisterHttpServerResponse) Descriptor deprecated

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

Deprecated: Use RegisterHttpServerResponse.ProtoReflect.Descriptor instead.

func (*RegisterHttpServerResponse) GetPort

func (x *RegisterHttpServerResponse) GetPort() string

func (*RegisterHttpServerResponse) ProtoMessage

func (*RegisterHttpServerResponse) ProtoMessage()

func (*RegisterHttpServerResponse) ProtoReflect

func (*RegisterHttpServerResponse) Reset

func (x *RegisterHttpServerResponse) Reset()

func (*RegisterHttpServerResponse) String

func (x *RegisterHttpServerResponse) String() string

func (*RegisterHttpServerResponse) Validate

func (m *RegisterHttpServerResponse) Validate() error

Validate checks the field values on RegisterHttpServerResponse with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*RegisterHttpServerResponse) ValidateAll

func (m *RegisterHttpServerResponse) ValidateAll() error

ValidateAll checks the field values on RegisterHttpServerResponse with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in RegisterHttpServerResponseMultiError, or nil if none found.

type RegisterHttpServerResponseMultiError

type RegisterHttpServerResponseMultiError []error

RegisterHttpServerResponseMultiError is an error wrapping multiple validation errors returned by RegisterHttpServerResponse.ValidateAll() if the designated constraints aren't met.

func (RegisterHttpServerResponseMultiError) AllErrors

AllErrors returns a list of validation violation errors.

func (RegisterHttpServerResponseMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type RegisterHttpServerResponseValidationError

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

RegisterHttpServerResponseValidationError is the validation error returned by RegisterHttpServerResponse.Validate if the designated constraints aren't met.

func (RegisterHttpServerResponseValidationError) Cause

Cause function returns cause value.

func (RegisterHttpServerResponseValidationError) Error

Error satisfies the builtin error interface

func (RegisterHttpServerResponseValidationError) ErrorName

ErrorName returns error name.

func (RegisterHttpServerResponseValidationError) Field

Field function returns field value.

func (RegisterHttpServerResponseValidationError) Key

Key function returns key value.

func (RegisterHttpServerResponseValidationError) Reason

Reason function returns reason value.

type RegisterRequest

type RegisterRequest struct {

	// name is the name of the microservice
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// domain is the domain of the microservice
	Domain string `protobuf:"bytes,2,opt,name=domain,proto3" json:"domain,omitempty"`
	// version is the version of the microservice (must take the form: vMAJOR.MINOR.PATCH)
	Version string `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"`
	// contains filtered or unexported fields
}

func (*RegisterRequest) Descriptor deprecated

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

Deprecated: Use RegisterRequest.ProtoReflect.Descriptor instead.

func (*RegisterRequest) GetDomain

func (x *RegisterRequest) GetDomain() string

func (*RegisterRequest) GetName

func (x *RegisterRequest) GetName() string

func (*RegisterRequest) GetVersion

func (x *RegisterRequest) GetVersion() string

func (*RegisterRequest) ProtoMessage

func (*RegisterRequest) ProtoMessage()

func (*RegisterRequest) ProtoReflect

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

func (*RegisterRequest) Reset

func (x *RegisterRequest) Reset()

func (*RegisterRequest) String

func (x *RegisterRequest) String() string

func (*RegisterRequest) Validate

func (m *RegisterRequest) Validate() error

Validate checks the field values on RegisterRequest with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*RegisterRequest) ValidateAll

func (m *RegisterRequest) ValidateAll() error

ValidateAll checks the field values on RegisterRequest with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in RegisterRequestMultiError, or nil if none found.

type RegisterRequestMultiError

type RegisterRequestMultiError []error

RegisterRequestMultiError is an error wrapping multiple validation errors returned by RegisterRequest.ValidateAll() if the designated constraints aren't met.

func (RegisterRequestMultiError) AllErrors

func (m RegisterRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (RegisterRequestMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type RegisterRequestValidationError

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

RegisterRequestValidationError is the validation error returned by RegisterRequest.Validate if the designated constraints aren't met.

func (RegisterRequestValidationError) Cause

Cause function returns cause value.

func (RegisterRequestValidationError) Error

Error satisfies the builtin error interface

func (RegisterRequestValidationError) ErrorName

func (e RegisterRequestValidationError) ErrorName() string

ErrorName returns error name.

func (RegisterRequestValidationError) Field

Field function returns field value.

func (RegisterRequestValidationError) Key

Key function returns key value.

func (RegisterRequestValidationError) Reason

Reason function returns reason value.

type RegisterResponse

type RegisterResponse struct {
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

func (*RegisterResponse) Descriptor deprecated

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

Deprecated: Use RegisterResponse.ProtoReflect.Descriptor instead.

func (*RegisterResponse) GetId

func (x *RegisterResponse) GetId() string

func (*RegisterResponse) ProtoMessage

func (*RegisterResponse) ProtoMessage()

func (*RegisterResponse) ProtoReflect

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

func (*RegisterResponse) Reset

func (x *RegisterResponse) Reset()

func (*RegisterResponse) String

func (x *RegisterResponse) String() string

func (*RegisterResponse) Validate

func (m *RegisterResponse) Validate() error

Validate checks the field values on RegisterResponse with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*RegisterResponse) ValidateAll

func (m *RegisterResponse) ValidateAll() error

ValidateAll checks the field values on RegisterResponse with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in RegisterResponseMultiError, or nil if none found.

type RegisterResponseMultiError

type RegisterResponseMultiError []error

RegisterResponseMultiError is an error wrapping multiple validation errors returned by RegisterResponse.ValidateAll() if the designated constraints aren't met.

func (RegisterResponseMultiError) AllErrors

func (m RegisterResponseMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (RegisterResponseMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type RegisterResponseValidationError

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

RegisterResponseValidationError is the validation error returned by RegisterResponse.Validate if the designated constraints aren't met.

func (RegisterResponseValidationError) Cause

Cause function returns cause value.

func (RegisterResponseValidationError) Error

Error satisfies the builtin error interface

func (RegisterResponseValidationError) ErrorName

ErrorName returns error name.

func (RegisterResponseValidationError) Field

Field function returns field value.

func (RegisterResponseValidationError) Key

Key function returns key value.

func (RegisterResponseValidationError) Reason

Reason function returns reason value.

type Registration

type Registration struct {

	// the table primary key
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// NOTE: name + version + domain must be unique
	// the service domain
	Domain string `protobuf:"bytes,2,opt,name=domain,proto3" json:"domain,omitempty"`
	// the service name
	Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
	// the service version
	Version string `protobuf:"bytes,4,opt,name=version,proto3" json:"version,omitempty"`
	// the service status
	Status ServiceStatus `protobuf:"varint,5,opt,name=status,proto3,enum=core.registry.v1.ServiceStatus" json:"status,omitempty"`
	// contains filtered or unexported fields
}

func DefaultApplyFieldMaskRegistration

func DefaultApplyFieldMaskRegistration(ctx context.Context, patchee *Registration, patcher *Registration, updateMask *field_mask.FieldMask, prefix string, db *gorm.DB) (*Registration, error)

DefaultApplyFieldMaskRegistration patches an pbObject with patcher according to a field mask.

func DefaultCreateRegistration

func DefaultCreateRegistration(ctx context.Context, in *Registration, db *gorm.DB) (*Registration, error)

DefaultCreateRegistration executes a basic gorm create call

func DefaultListRegistration

func DefaultListRegistration(ctx context.Context, db *gorm.DB) ([]*Registration, error)

DefaultListRegistration executes a gorm list call

func DefaultPatchRegistration

func DefaultPatchRegistration(ctx context.Context, in *Registration, updateMask *field_mask.FieldMask, db *gorm.DB) (*Registration, error)

DefaultPatchRegistration executes a basic gorm update call with patch behavior

func DefaultPatchSetRegistration

func DefaultPatchSetRegistration(ctx context.Context, objects []*Registration, updateMasks []*field_mask.FieldMask, db *gorm.DB) ([]*Registration, error)

DefaultPatchSetRegistration executes a bulk gorm update call with patch behavior

func DefaultReadRegistration

func DefaultReadRegistration(ctx context.Context, in *Registration, db *gorm.DB) (*Registration, error)

func DefaultStrictUpdateRegistration

func DefaultStrictUpdateRegistration(ctx context.Context, in *Registration, db *gorm.DB) (*Registration, error)

DefaultStrictUpdateRegistration clears / replaces / appends first level 1:many children and then executes a gorm update call

func (*Registration) Descriptor deprecated

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

Deprecated: Use Registration.ProtoReflect.Descriptor instead.

func (*Registration) GetDomain

func (x *Registration) GetDomain() string

func (*Registration) GetId

func (x *Registration) GetId() string

func (*Registration) GetName

func (x *Registration) GetName() string

func (*Registration) GetStatus

func (x *Registration) GetStatus() ServiceStatus

func (*Registration) GetVersion

func (x *Registration) GetVersion() string

func (*Registration) ProtoMessage

func (*Registration) ProtoMessage()

func (*Registration) ProtoReflect

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

func (*Registration) Reset

func (x *Registration) Reset()

func (*Registration) String

func (x *Registration) String() string

func (*Registration) ToORM

ToORM runs the BeforeToORM hook if present, converts the fields of this object to ORM format, runs the AfterToORM hook, then returns the ORM object

func (*Registration) Validate

func (m *Registration) Validate() error

Validate checks the field values on Registration with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*Registration) ValidateAll

func (m *Registration) ValidateAll() error

ValidateAll checks the field values on Registration with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in RegistrationMultiError, or nil if none found.

type RegistrationMultiError

type RegistrationMultiError []error

RegistrationMultiError is an error wrapping multiple validation errors returned by Registration.ValidateAll() if the designated constraints aren't met.

func (RegistrationMultiError) AllErrors

func (m RegistrationMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (RegistrationMultiError) Error

func (m RegistrationMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type RegistrationORM

type RegistrationORM struct {
	Domain  string `gorm:"unique_index:idx"`
	Id      string `gorm:"type:uuid;primary_key"`
	Name    string `gorm:"unique_index:idx"`
	Status  int32
	Version string `gorm:"unique_index:idx"`
}

func (RegistrationORM) TableName

func (RegistrationORM) TableName() string

TableName overrides the default tablename generated by GORM

func (*RegistrationORM) ToPB

ToPB runs the BeforeToPB hook if present, converts the fields of this object to PB format, runs the AfterToPB hook, then returns the PB object

type RegistrationORMWithAfterCreate_

type RegistrationORMWithAfterCreate_ interface {
	AfterCreate_(context.Context, *gorm.DB) error
}

type RegistrationORMWithAfterDeleteSet

type RegistrationORMWithAfterDeleteSet interface {
	AfterDeleteSet(context.Context, []*Registration, *gorm.DB) error
}

type RegistrationORMWithAfterDelete_

type RegistrationORMWithAfterDelete_ interface {
	AfterDelete_(context.Context, *gorm.DB) error
}

type RegistrationORMWithAfterListFind

type RegistrationORMWithAfterListFind interface {
	AfterListFind(context.Context, *gorm.DB, *[]RegistrationORM) error
}

type RegistrationORMWithAfterReadFind

type RegistrationORMWithAfterReadFind interface {
	AfterReadFind(context.Context, *gorm.DB) error
}

type RegistrationORMWithAfterStrictUpdateSave

type RegistrationORMWithAfterStrictUpdateSave interface {
	AfterStrictUpdateSave(context.Context, *gorm.DB) error
}

type RegistrationORMWithBeforeCreate_

type RegistrationORMWithBeforeCreate_ interface {
	BeforeCreate_(context.Context, *gorm.DB) (*gorm.DB, error)
}

type RegistrationORMWithBeforeDeleteSet

type RegistrationORMWithBeforeDeleteSet interface {
	BeforeDeleteSet(context.Context, []*Registration, *gorm.DB) (*gorm.DB, error)
}

type RegistrationORMWithBeforeDelete_

type RegistrationORMWithBeforeDelete_ interface {
	BeforeDelete_(context.Context, *gorm.DB) (*gorm.DB, error)
}

type RegistrationORMWithBeforeListApplyQuery

type RegistrationORMWithBeforeListApplyQuery interface {
	BeforeListApplyQuery(context.Context, *gorm.DB) (*gorm.DB, error)
}

type RegistrationORMWithBeforeListFind

type RegistrationORMWithBeforeListFind interface {
	BeforeListFind(context.Context, *gorm.DB) (*gorm.DB, error)
}

type RegistrationORMWithBeforeReadApplyQuery

type RegistrationORMWithBeforeReadApplyQuery interface {
	BeforeReadApplyQuery(context.Context, *gorm.DB) (*gorm.DB, error)
}

type RegistrationORMWithBeforeReadFind

type RegistrationORMWithBeforeReadFind interface {
	BeforeReadFind(context.Context, *gorm.DB) (*gorm.DB, error)
}

type RegistrationORMWithBeforeStrictUpdateCleanup

type RegistrationORMWithBeforeStrictUpdateCleanup interface {
	BeforeStrictUpdateCleanup(context.Context, *gorm.DB) (*gorm.DB, error)
}

type RegistrationORMWithBeforeStrictUpdateSave

type RegistrationORMWithBeforeStrictUpdateSave interface {
	BeforeStrictUpdateSave(context.Context, *gorm.DB) (*gorm.DB, error)
}

type RegistrationValidationError

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

RegistrationValidationError is the validation error returned by Registration.Validate if the designated constraints aren't met.

func (RegistrationValidationError) Cause

Cause function returns cause value.

func (RegistrationValidationError) Error

Error satisfies the builtin error interface

func (RegistrationValidationError) ErrorName

func (e RegistrationValidationError) ErrorName() string

ErrorName returns error name.

func (RegistrationValidationError) Field

Field function returns field value.

func (RegistrationValidationError) Key

Key function returns key value.

func (RegistrationValidationError) Reason

Reason function returns reason value.

type RegistrationWithAfterPatchSave

type RegistrationWithAfterPatchSave interface {
	AfterPatchSave(context.Context, *Registration, *field_mask.FieldMask, *gorm.DB) error
}

type RegistrationWithAfterToORM

type RegistrationWithAfterToORM interface {
	AfterToORM(context.Context, *RegistrationORM) error
}

RegistrationAfterToORM called after default ToORM code

type RegistrationWithAfterToPB

type RegistrationWithAfterToPB interface {
	AfterToPB(context.Context, *Registration) error
}

RegistrationAfterToPB called after default ToPB code

type RegistrationWithBeforePatchApplyFieldMask

type RegistrationWithBeforePatchApplyFieldMask interface {
	BeforePatchApplyFieldMask(context.Context, *Registration, *field_mask.FieldMask, *gorm.DB) (*gorm.DB, error)
}

type RegistrationWithBeforePatchRead

type RegistrationWithBeforePatchRead interface {
	BeforePatchRead(context.Context, *Registration, *field_mask.FieldMask, *gorm.DB) (*gorm.DB, error)
}

type RegistrationWithBeforePatchSave

type RegistrationWithBeforePatchSave interface {
	BeforePatchSave(context.Context, *Registration, *field_mask.FieldMask, *gorm.DB) (*gorm.DB, error)
}

type RegistrationWithBeforeToORM

type RegistrationWithBeforeToORM interface {
	BeforeToORM(context.Context, *RegistrationORM) error
}

RegistrationBeforeToORM called before default ToORM code

type RegistrationWithBeforeToPB

type RegistrationWithBeforeToPB interface {
	BeforeToPB(context.Context, *Registration) error
}

RegistrationBeforeToPB called before default ToPB code

type RegistryClient

type RegistryClient interface {
	// Register registers a microservice with the registry
	Register(ctx context.Context, in *RegisterRequest, opts ...grpc.CallOption) (*RegisterResponse, error)
	RegisterGrpcServer(ctx context.Context, in *RegisterGrpcServerRequest, opts ...grpc.CallOption) (*RegisterGrpcServerResponse, error)
	RegisterHttpServer(ctx context.Context, in *RegisterHttpServerRequest, opts ...grpc.CallOption) (*RegisterHttpServerResponse, error)
	RegisterConsumers(ctx context.Context, in *RegisterConsumersRequest, opts ...grpc.CallOption) (*RegisterConsumersResponse, error)
	// Connection returns the connection info for a microservice.
	// Example: Service A wishes to call Service B, A calls registry.Connection(B)
	//
	//	which returns the connection info for B. If B is not available or
	//	not registered, an error will be returned.
	Connection(ctx context.Context, in *ConnectionRequest, opts ...grpc.CallOption) (*ConnectionResponse, error)
}

RegistryClient is the client API for Registry service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewRegistryClient

func NewRegistryClient(cc grpc.ClientConnInterface) RegistryClient

type RegistryServer

type RegistryServer interface {
	// Register registers a microservice with the registry
	Register(context.Context, *RegisterRequest) (*RegisterResponse, error)
	RegisterGrpcServer(context.Context, *RegisterGrpcServerRequest) (*RegisterGrpcServerResponse, error)
	RegisterHttpServer(context.Context, *RegisterHttpServerRequest) (*RegisterHttpServerResponse, error)
	RegisterConsumers(context.Context, *RegisterConsumersRequest) (*RegisterConsumersResponse, error)
	// Connection returns the connection info for a microservice.
	// Example: Service A wishes to call Service B, A calls registry.Connection(B)
	//
	//	which returns the connection info for B. If B is not available or
	//	not registered, an error will be returned.
	Connection(context.Context, *ConnectionRequest) (*ConnectionResponse, error)
}

RegistryServer is the server API for Registry service. All implementations should embed UnimplementedRegistryServer for forward compatibility

type Server

type Server struct {

	// the table primary key
	Id     string     `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Scheme string     `protobuf:"bytes,2,opt,name=scheme,proto3" json:"scheme,omitempty"`
	Host   string     `protobuf:"bytes,3,opt,name=host,proto3" json:"host,omitempty"`
	Port   string     `protobuf:"bytes,4,opt,name=port,proto3" json:"port,omitempty"`
	Route  string     `protobuf:"bytes,5,opt,name=route,proto3" json:"route,omitempty"`
	Kind   ServerKind `protobuf:"varint,6,opt,name=kind,proto3,enum=core.registry.v1.ServerKind" json:"kind,omitempty"`
	// contains filtered or unexported fields
}

func DefaultApplyFieldMaskServer

func DefaultApplyFieldMaskServer(ctx context.Context, patchee *Server, patcher *Server, updateMask *field_mask.FieldMask, prefix string, db *gorm.DB) (*Server, error)

DefaultApplyFieldMaskServer patches an pbObject with patcher according to a field mask.

func DefaultCreateServer

func DefaultCreateServer(ctx context.Context, in *Server, db *gorm.DB) (*Server, error)

DefaultCreateServer executes a basic gorm create call

func DefaultListServer

func DefaultListServer(ctx context.Context, db *gorm.DB) ([]*Server, error)

DefaultListServer executes a gorm list call

func DefaultPatchServer

func DefaultPatchServer(ctx context.Context, in *Server, updateMask *field_mask.FieldMask, db *gorm.DB) (*Server, error)

DefaultPatchServer executes a basic gorm update call with patch behavior

func DefaultPatchSetServer

func DefaultPatchSetServer(ctx context.Context, objects []*Server, updateMasks []*field_mask.FieldMask, db *gorm.DB) ([]*Server, error)

DefaultPatchSetServer executes a bulk gorm update call with patch behavior

func DefaultReadServer

func DefaultReadServer(ctx context.Context, in *Server, db *gorm.DB) (*Server, error)

func DefaultStrictUpdateServer

func DefaultStrictUpdateServer(ctx context.Context, in *Server, db *gorm.DB) (*Server, error)

DefaultStrictUpdateServer clears / replaces / appends first level 1:many children and then executes a gorm update call

func (*Server) Descriptor deprecated

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

Deprecated: Use Server.ProtoReflect.Descriptor instead.

func (*Server) GetHost

func (x *Server) GetHost() string

func (*Server) GetId

func (x *Server) GetId() string

func (*Server) GetKind

func (x *Server) GetKind() ServerKind

func (*Server) GetPort

func (x *Server) GetPort() string

func (*Server) GetRoute

func (x *Server) GetRoute() string

func (*Server) GetScheme

func (x *Server) GetScheme() string

func (*Server) ProtoMessage

func (*Server) ProtoMessage()

func (*Server) ProtoReflect

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

func (*Server) Reset

func (x *Server) Reset()

func (*Server) String

func (x *Server) String() string

func (*Server) ToORM

func (m *Server) ToORM(ctx context.Context) (ServerORM, error)

ToORM runs the BeforeToORM hook if present, converts the fields of this object to ORM format, runs the AfterToORM hook, then returns the ORM object

func (*Server) Validate

func (m *Server) Validate() error

Validate checks the field values on Server with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*Server) ValidateAll

func (m *Server) ValidateAll() error

ValidateAll checks the field values on Server with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in ServerMultiError, or nil if none found.

type ServerKind

type ServerKind int32
const (
	ServerKind_SERVER_KIND_UNSPECIFIED ServerKind = 0
	ServerKind_SERVER_KIND_GRPC        ServerKind = 1
	ServerKind_SERVER_KIND_HTTP        ServerKind = 2
)

func (ServerKind) Descriptor

func (ServerKind) Descriptor() protoreflect.EnumDescriptor

func (ServerKind) Enum

func (x ServerKind) Enum() *ServerKind

func (ServerKind) EnumDescriptor deprecated

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

Deprecated: Use ServerKind.Descriptor instead.

func (ServerKind) Number

func (x ServerKind) Number() protoreflect.EnumNumber

func (ServerKind) String

func (x ServerKind) String() string

func (ServerKind) Type

type ServerMultiError

type ServerMultiError []error

ServerMultiError is an error wrapping multiple validation errors returned by Server.ValidateAll() if the designated constraints aren't met.

func (ServerMultiError) AllErrors

func (m ServerMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (ServerMultiError) Error

func (m ServerMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type ServerORM

type ServerORM struct {
	Host   string
	Id     string `gorm:"type:uuid;primary_key"`
	Kind   int32
	Port   string
	Route  string
	Scheme string
}

func (ServerORM) TableName

func (ServerORM) TableName() string

TableName overrides the default tablename generated by GORM

func (*ServerORM) ToPB

func (m *ServerORM) ToPB(ctx context.Context) (Server, error)

ToPB runs the BeforeToPB hook if present, converts the fields of this object to PB format, runs the AfterToPB hook, then returns the PB object

type ServerORMWithAfterCreate_

type ServerORMWithAfterCreate_ interface {
	AfterCreate_(context.Context, *gorm.DB) error
}

type ServerORMWithAfterDeleteSet

type ServerORMWithAfterDeleteSet interface {
	AfterDeleteSet(context.Context, []*Server, *gorm.DB) error
}

type ServerORMWithAfterDelete_

type ServerORMWithAfterDelete_ interface {
	AfterDelete_(context.Context, *gorm.DB) error
}

type ServerORMWithAfterListFind

type ServerORMWithAfterListFind interface {
	AfterListFind(context.Context, *gorm.DB, *[]ServerORM) error
}

type ServerORMWithAfterReadFind

type ServerORMWithAfterReadFind interface {
	AfterReadFind(context.Context, *gorm.DB) error
}

type ServerORMWithAfterStrictUpdateSave

type ServerORMWithAfterStrictUpdateSave interface {
	AfterStrictUpdateSave(context.Context, *gorm.DB) error
}

type ServerORMWithBeforeCreate_

type ServerORMWithBeforeCreate_ interface {
	BeforeCreate_(context.Context, *gorm.DB) (*gorm.DB, error)
}

type ServerORMWithBeforeDeleteSet

type ServerORMWithBeforeDeleteSet interface {
	BeforeDeleteSet(context.Context, []*Server, *gorm.DB) (*gorm.DB, error)
}

type ServerORMWithBeforeDelete_

type ServerORMWithBeforeDelete_ interface {
	BeforeDelete_(context.Context, *gorm.DB) (*gorm.DB, error)
}

type ServerORMWithBeforeListApplyQuery

type ServerORMWithBeforeListApplyQuery interface {
	BeforeListApplyQuery(context.Context, *gorm.DB) (*gorm.DB, error)
}

type ServerORMWithBeforeListFind

type ServerORMWithBeforeListFind interface {
	BeforeListFind(context.Context, *gorm.DB) (*gorm.DB, error)
}

type ServerORMWithBeforeReadApplyQuery

type ServerORMWithBeforeReadApplyQuery interface {
	BeforeReadApplyQuery(context.Context, *gorm.DB) (*gorm.DB, error)
}

type ServerORMWithBeforeReadFind

type ServerORMWithBeforeReadFind interface {
	BeforeReadFind(context.Context, *gorm.DB) (*gorm.DB, error)
}

type ServerORMWithBeforeStrictUpdateCleanup

type ServerORMWithBeforeStrictUpdateCleanup interface {
	BeforeStrictUpdateCleanup(context.Context, *gorm.DB) (*gorm.DB, error)
}

type ServerORMWithBeforeStrictUpdateSave

type ServerORMWithBeforeStrictUpdateSave interface {
	BeforeStrictUpdateSave(context.Context, *gorm.DB) (*gorm.DB, error)
}

type ServerValidationError

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

ServerValidationError is the validation error returned by Server.Validate if the designated constraints aren't met.

func (ServerValidationError) Cause

func (e ServerValidationError) Cause() error

Cause function returns cause value.

func (ServerValidationError) Error

func (e ServerValidationError) Error() string

Error satisfies the builtin error interface

func (ServerValidationError) ErrorName

func (e ServerValidationError) ErrorName() string

ErrorName returns error name.

func (ServerValidationError) Field

func (e ServerValidationError) Field() string

Field function returns field value.

func (ServerValidationError) Key

func (e ServerValidationError) Key() bool

Key function returns key value.

func (ServerValidationError) Reason

func (e ServerValidationError) Reason() string

Reason function returns reason value.

type ServerWithAfterPatchSave

type ServerWithAfterPatchSave interface {
	AfterPatchSave(context.Context, *Server, *field_mask.FieldMask, *gorm.DB) error
}

type ServerWithAfterToORM

type ServerWithAfterToORM interface {
	AfterToORM(context.Context, *ServerORM) error
}

ServerAfterToORM called after default ToORM code

type ServerWithAfterToPB

type ServerWithAfterToPB interface {
	AfterToPB(context.Context, *Server) error
}

ServerAfterToPB called after default ToPB code

type ServerWithBeforePatchApplyFieldMask

type ServerWithBeforePatchApplyFieldMask interface {
	BeforePatchApplyFieldMask(context.Context, *Server, *field_mask.FieldMask, *gorm.DB) (*gorm.DB, error)
}

type ServerWithBeforePatchRead

type ServerWithBeforePatchRead interface {
	BeforePatchRead(context.Context, *Server, *field_mask.FieldMask, *gorm.DB) (*gorm.DB, error)
}

type ServerWithBeforePatchSave

type ServerWithBeforePatchSave interface {
	BeforePatchSave(context.Context, *Server, *field_mask.FieldMask, *gorm.DB) (*gorm.DB, error)
}

type ServerWithBeforeToORM

type ServerWithBeforeToORM interface {
	BeforeToORM(context.Context, *ServerORM) error
}

ServerBeforeToORM called before default ToORM code

type ServerWithBeforeToPB

type ServerWithBeforeToPB interface {
	BeforeToPB(context.Context, *Server) error
}

ServerBeforeToPB called before default ToPB code

type ServiceStatus

type ServiceStatus int32

deregister vs unregister reference: https://grammarhow.com/unregister-vs-deregister/

const (
	ServiceStatus_SERVICE_STATUS_UNSPECIFIED  ServiceStatus = 0
	ServiceStatus_SERVICE_STATUS_REGISTERED   ServiceStatus = 1
	ServiceStatus_SERVICE_STATUS_DEREGISTERED ServiceStatus = 2
	ServiceStatus_SERVICE_STATUS_HEALTHY      ServiceStatus = 3
	ServiceStatus_SERVICE_STATUS_UNHEALTHY    ServiceStatus = 4
)

func (ServiceStatus) Descriptor

func (ServiceStatus) Enum

func (x ServiceStatus) Enum() *ServiceStatus

func (ServiceStatus) EnumDescriptor deprecated

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

Deprecated: Use ServiceStatus.Descriptor instead.

func (ServiceStatus) Number

func (ServiceStatus) String

func (x ServiceStatus) String() string

func (ServiceStatus) Type

type Status

type Status int32
const (
	Status_STATUS_INVALID_UNSPECIFIED Status = 0
	Status_STATUS_HEALTHY             Status = 1
	Status_STATUS_UNHEALTHY           Status = 2
)

func (Status) Descriptor

func (Status) Descriptor() protoreflect.EnumDescriptor

func (Status) Enum

func (x Status) Enum() *Status

func (Status) EnumDescriptor deprecated

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

Deprecated: Use Status.Descriptor instead.

func (Status) Number

func (x Status) Number() protoreflect.EnumNumber

func (Status) String

func (x Status) String() string

func (Status) Type

func (Status) Type() protoreflect.EnumType

type UnimplementedRegistryServer

type UnimplementedRegistryServer struct {
}

UnimplementedRegistryServer should be embedded to have forward compatible implementations.

func (UnimplementedRegistryServer) Connection

func (UnimplementedRegistryServer) Register

func (UnimplementedRegistryServer) RegisterConsumers

type UnsafeRegistryServer

type UnsafeRegistryServer interface {
	// contains filtered or unexported methods
}

UnsafeRegistryServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to RegistryServer will result in compilation errors.

Jump to

Keyboard shortcuts

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