v1

package
v0.0.0-...-cbc4384 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var EventService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "api.sync.v1.EventService",
	HandlerType: (*EventServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Sync",
			Handler:    _EventService_Sync_Handler,
		},
		{
			MethodName: "Health",
			Handler:    _EventService_Health_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "event_service.proto",
}

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

View Source
var File_event_service_proto protoreflect.FileDescriptor

Functions

func RegisterEventServiceServer

func RegisterEventServiceServer(s grpc.ServiceRegistrar, srv EventServiceServer)

Types

type Event

type Event struct {
	Id      string            `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`           //entity id
	Action  string            `protobuf:"bytes,2,opt,name=action,proto3" json:"action,omitempty"`   //create, delete, update
	Subject string            `protobuf:"bytes,3,opt,name=subject,proto3" json:"subject,omitempty"` //a entity name such as account, role, service, instance
	Opts    map[string]string ``                                                                    //metadata or options
	/* 149-byte string literal not displayed */
	Value []byte `protobuf:"bytes,5,opt,name=value,proto3" json:"value,omitempty"` // the entity
	// contains filtered or unexported fields
}

func (*Event) Descriptor deprecated

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

Deprecated: Use Event.ProtoReflect.Descriptor instead.

func (*Event) GetAction

func (x *Event) GetAction() string

func (*Event) GetId

func (x *Event) GetId() string

func (*Event) GetOpts

func (x *Event) GetOpts() map[string]string

func (*Event) GetSubject

func (x *Event) GetSubject() string

func (*Event) GetValue

func (x *Event) GetValue() []byte

func (*Event) ProtoMessage

func (*Event) ProtoMessage()

func (*Event) ProtoReflect

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

func (*Event) Reset

func (x *Event) Reset()

func (*Event) String

func (x *Event) String() string

type EventList

type EventList struct {
	Events []*Event `protobuf:"bytes,1,rep,name=events,proto3" json:"events,omitempty"`
	// contains filtered or unexported fields
}

func (*EventList) Descriptor deprecated

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

Deprecated: Use EventList.ProtoReflect.Descriptor instead.

func (*EventList) GetEvents

func (x *EventList) GetEvents() []*Event

func (*EventList) ProtoMessage

func (*EventList) ProtoMessage()

func (*EventList) ProtoReflect

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

func (*EventList) Reset

func (x *EventList) Reset()

func (*EventList) String

func (x *EventList) String() string

type EventServiceClient

type EventServiceClient interface {
	Sync(ctx context.Context, in *EventList, opts ...grpc.CallOption) (*Results, error)
	Health(ctx context.Context, in *HealthRequest, opts ...grpc.CallOption) (*HealthReply, error)
}

EventServiceClient is the client API for EventService 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.

type EventServiceServer

type EventServiceServer interface {
	Sync(context.Context, *EventList) (*Results, error)
	Health(context.Context, *HealthRequest) (*HealthReply, error)
	// contains filtered or unexported methods
}

EventServiceServer is the server API for EventService service. All implementations must embed UnimplementedEventServiceServer for forward compatibility

type HealthReply

type HealthReply struct {
	Status         string `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
	LocalTimestamp int64  `protobuf:"varint,2,opt,name=local_timestamp,json=localTimestamp,proto3" json:"local_timestamp,omitempty"`
	// contains filtered or unexported fields
}

func (*HealthReply) Descriptor deprecated

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

Deprecated: Use HealthReply.ProtoReflect.Descriptor instead.

func (*HealthReply) GetLocalTimestamp

func (x *HealthReply) GetLocalTimestamp() int64

func (*HealthReply) GetStatus

func (x *HealthReply) GetStatus() string

func (*HealthReply) ProtoMessage

func (*HealthReply) ProtoMessage()

func (*HealthReply) ProtoReflect

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

func (*HealthReply) Reset

func (x *HealthReply) Reset()

func (*HealthReply) String

func (x *HealthReply) String() string

type HealthRequest

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

func (*HealthRequest) Descriptor deprecated

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

Deprecated: Use HealthRequest.ProtoReflect.Descriptor instead.

func (*HealthRequest) ProtoMessage

func (*HealthRequest) ProtoMessage()

func (*HealthRequest) ProtoReflect

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

func (*HealthRequest) Reset

func (x *HealthRequest) Reset()

func (*HealthRequest) String

func (x *HealthRequest) String() string

type Result

type Result struct {
	Code    int32  `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` //reuse standard http code
	Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
	// contains filtered or unexported fields
}

func (*Result) Descriptor deprecated

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

Deprecated: Use Result.ProtoReflect.Descriptor instead.

func (*Result) GetCode

func (x *Result) GetCode() int32

func (*Result) GetMessage

func (x *Result) GetMessage() string

func (*Result) ProtoMessage

func (*Result) ProtoMessage()

func (*Result) ProtoReflect

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

func (*Result) Reset

func (x *Result) Reset()

func (*Result) String

func (x *Result) String() string

type Results

type Results struct {
	Results map[string]*Result `` //id to result
	/* 155-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*Results) Descriptor deprecated

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

Deprecated: Use Results.ProtoReflect.Descriptor instead.

func (*Results) GetResults

func (x *Results) GetResults() map[string]*Result

func (*Results) ProtoMessage

func (*Results) ProtoMessage()

func (*Results) ProtoReflect

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

func (*Results) Reset

func (x *Results) Reset()

func (*Results) String

func (x *Results) String() string

type UnimplementedEventServiceServer

type UnimplementedEventServiceServer struct {
}

UnimplementedEventServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedEventServiceServer) Health

func (UnimplementedEventServiceServer) Sync

type UnsafeEventServiceServer

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

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

Jump to

Keyboard shortcuts

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