command

package
v0.0.0-...-fe69749 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2021 License: MIT Imports: 11 Imported by: 0

README

command

This folder contains the gRPC/ProtocolBuffers definitions for the Command API. It also contains the generated Go code. The generated Dart code resides in ../resident_ui/lib/command.

Install build dependencies

To generate Go and Dart code, you need a number of tools installed.

  • You have already installed Go and Dart.
  • Install make. This is almost always available in your systems default software repository. e.g.: sudo apt install build-essentials. If you're a developer, this is probably already installed.
  • Install protoc, the protocol buffers compiler.
  • Install protoc-gen-dart, the protoc extension for Dart.
  • Install protoc-gen-go, the protoc compiler for Go.
  • Install protoc-gen-gogofaster, an alternative/overloaded protoc extension for Go that provides more optimizations and features than the default one.

Run

Tun make in this directory to compile the proto to Go and Dart code, and to generate the .protoset file for use with a CLI client such as grpcurl.

cd ~/src/gitlab.com/commonground/xbrp/desq/command-api/command
make

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Command_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "command.Command",
	HandlerType: (*CommandServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "NewPerson",
			Handler:    _Command_NewPerson_Handler,
		},
		{
			MethodName: "PersonNote",
			Handler:    _Command_PersonNote_Handler,
		},
		{
			MethodName: "NamenVastgesteld",
			Handler:    _Command_NamenVastgesteld_Handler,
		},
		{
			MethodName: "PersoonIngeschreven",
			Handler:    _Command_PersoonIngeschreven_Handler,
		},
		{
			MethodName: "BSNToegekend",
			Handler:    _Command_BSNToegekend_Handler,
		},
		{
			MethodName: "WoonadresNLGeregistreerd",
			Handler:    _Command_WoonadresNLGeregistreerd_Handler,
		},
		{
			MethodName: "NamenGeregistreerd",
			Handler:    _Command_NamenGeregistreerd_Handler,
		},
		{
			MethodName: "GeslachtsaanduidingGeregistreerd",
			Handler:    _Command_GeslachtsaanduidingGeregistreerd_Handler,
		},
		{
			MethodName: "Status",
			Handler:    _Command_Status_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "command-api/command/command.proto",
}

Command_ServiceDesc is the grpc.ServiceDesc for Command 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_command_api_command_command_proto protoreflect.FileDescriptor

Functions

func RegisterCommandServer

func RegisterCommandServer(s grpc.ServiceRegistrar, srv CommandServer)

Types

type BasicReply

type BasicReply struct {

	// commandReference is an ascii string of undefined length. Users of this API
	// must make no assumptions about the contents of the commandReference string
	// as its value structure may change in future iterations of the command-api.
	//
	// The commandReference can be used to obtain the status (progress) of a
	// command. For more information, see the Status(..)(..) method.
	CommandReference string `protobuf:"bytes,1,opt,name=commandReference,proto3" json:"commandReference,omitempty"`
	// contains filtered or unexported fields
}

func (*BasicReply) Descriptor deprecated

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

Deprecated: Use BasicReply.ProtoReflect.Descriptor instead.

func (*BasicReply) GetCommandReference

func (x *BasicReply) GetCommandReference() string

func (*BasicReply) ProtoMessage

func (*BasicReply) ProtoMessage()

func (*BasicReply) ProtoReflect

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

func (*BasicReply) Reset

func (x *BasicReply) Reset()

func (*BasicReply) String

func (x *BasicReply) String() string

type CommandClient

type CommandClient interface {
	// NewPerson adds a command/event to the event store.
	NewPerson(ctx context.Context, in *NewPersonRequest, opts ...grpc.CallOption) (*NewPersonReply, error)
	// PersonNote adds a command/event to the event store.
	PersonNote(ctx context.Context, in *PersonNoteRequest, opts ...grpc.CallOption) (*BasicReply, error)
	// NamenVastgesteld registers name information
	NamenVastgesteld(ctx context.Context, in *events.NamenVastgesteld, opts ...grpc.CallOption) (*BasicReply, error)
	// PersoonIngeschreven
	PersoonIngeschreven(ctx context.Context, in *PersoonIngeschrevenCommand, opts ...grpc.CallOption) (*PersoonIngeschrevenCommandReply, error)
	// BSNToegekend
	BSNToegekend(ctx context.Context, in *events.BSNToegekend, opts ...grpc.CallOption) (*BasicReply, error)
	// WoonadresNLGeregistreerd
	WoonadresNLGeregistreerd(ctx context.Context, in *events.WoonadresNLGeregistreerd, opts ...grpc.CallOption) (*BasicReply, error)
	// NamenGeregistreerd
	NamenGeregistreerd(ctx context.Context, in *events.NamenGeregistreerd, opts ...grpc.CallOption) (*BasicReply, error)
	// GeslachtsaanduidingGeregistreerd
	GeslachtsaanduidingGeregistreerd(ctx context.Context, in *events.GeslachtsaanduidingGeregistreerd, opts ...grpc.CallOption) (*BasicReply, error)
	// Status returns the status of a command as it is being added to the store.
	Status(ctx context.Context, in *StatusRequest, opts ...grpc.CallOption) (*StatusReply, error)
}

CommandClient is the client API for Command 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 NewCommandClient

func NewCommandClient(cc grpc.ClientConnInterface) CommandClient

type CommandServer

type CommandServer interface {
	// NewPerson adds a command/event to the event store.
	NewPerson(context.Context, *NewPersonRequest) (*NewPersonReply, error)
	// PersonNote adds a command/event to the event store.
	PersonNote(context.Context, *PersonNoteRequest) (*BasicReply, error)
	// NamenVastgesteld registers name information
	NamenVastgesteld(context.Context, *events.NamenVastgesteld) (*BasicReply, error)
	// PersoonIngeschreven
	PersoonIngeschreven(context.Context, *PersoonIngeschrevenCommand) (*PersoonIngeschrevenCommandReply, error)
	// BSNToegekend
	BSNToegekend(context.Context, *events.BSNToegekend) (*BasicReply, error)
	// WoonadresNLGeregistreerd
	WoonadresNLGeregistreerd(context.Context, *events.WoonadresNLGeregistreerd) (*BasicReply, error)
	// NamenGeregistreerd
	NamenGeregistreerd(context.Context, *events.NamenGeregistreerd) (*BasicReply, error)
	// GeslachtsaanduidingGeregistreerd
	GeslachtsaanduidingGeregistreerd(context.Context, *events.GeslachtsaanduidingGeregistreerd) (*BasicReply, error)
	// Status returns the status of a command as it is being added to the store.
	Status(context.Context, *StatusRequest) (*StatusReply, error)
	// contains filtered or unexported methods
}

CommandServer is the server API for Command service. All implementations must embed UnimplementedCommandServer for forward compatibility

type NewPersonReply

type NewPersonReply struct {
	CommandReference string `protobuf:"bytes,1,opt,name=commandReference,proto3" json:"commandReference,omitempty"`
	PersonReference  []byte `protobuf:"bytes,2,opt,name=personReference,proto3" json:"personReference,omitempty"`
	// contains filtered or unexported fields
}

func (*NewPersonReply) Descriptor deprecated

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

Deprecated: Use NewPersonReply.ProtoReflect.Descriptor instead.

func (*NewPersonReply) GetCommandReference

func (x *NewPersonReply) GetCommandReference() string

func (*NewPersonReply) GetPersonReference

func (x *NewPersonReply) GetPersonReference() []byte

func (*NewPersonReply) ProtoMessage

func (*NewPersonReply) ProtoMessage()

func (*NewPersonReply) ProtoReflect

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

func (*NewPersonReply) Reset

func (x *NewPersonReply) Reset()

func (*NewPersonReply) String

func (x *NewPersonReply) String() string

type NewPersonRequest

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

func (*NewPersonRequest) Descriptor deprecated

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

Deprecated: Use NewPersonRequest.ProtoReflect.Descriptor instead.

func (*NewPersonRequest) ProtoMessage

func (*NewPersonRequest) ProtoMessage()

func (*NewPersonRequest) ProtoReflect

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

func (*NewPersonRequest) Reset

func (x *NewPersonRequest) Reset()

func (*NewPersonRequest) String

func (x *NewPersonRequest) String() string

type PersonNoteRequest

type PersonNoteRequest struct {
	PersonReference []byte `protobuf:"bytes,1,opt,name=personReference,proto3" json:"personReference,omitempty"`
	Note            string `protobuf:"bytes,2,opt,name=note,proto3" json:"note,omitempty"`
	// contains filtered or unexported fields
}

func (*PersonNoteRequest) Descriptor deprecated

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

Deprecated: Use PersonNoteRequest.ProtoReflect.Descriptor instead.

func (*PersonNoteRequest) GetNote

func (x *PersonNoteRequest) GetNote() string

func (*PersonNoteRequest) GetPersonReference

func (x *PersonNoteRequest) GetPersonReference() []byte

func (*PersonNoteRequest) ProtoMessage

func (*PersonNoteRequest) ProtoMessage()

func (*PersonNoteRequest) ProtoReflect

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

func (*PersonNoteRequest) Reset

func (x *PersonNoteRequest) Reset()

func (*PersonNoteRequest) String

func (x *PersonNoteRequest) String() string

type PersoonIngeschrevenCommand

type PersoonIngeschrevenCommand struct {
	DatumIngeschreven *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=datum_ingeschreven,json=datumIngeschreven,proto3" json:"datum_ingeschreven,omitempty"`
	// contains filtered or unexported fields
}

func (*PersoonIngeschrevenCommand) Descriptor deprecated

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

Deprecated: Use PersoonIngeschrevenCommand.ProtoReflect.Descriptor instead.

func (*PersoonIngeschrevenCommand) GetDatumIngeschreven

func (x *PersoonIngeschrevenCommand) GetDatumIngeschreven() *timestamppb.Timestamp

func (*PersoonIngeschrevenCommand) ProtoMessage

func (*PersoonIngeschrevenCommand) ProtoMessage()

func (*PersoonIngeschrevenCommand) ProtoReflect

func (*PersoonIngeschrevenCommand) Reset

func (x *PersoonIngeschrevenCommand) Reset()

func (*PersoonIngeschrevenCommand) String

func (x *PersoonIngeschrevenCommand) String() string

type PersoonIngeschrevenCommandReply

type PersoonIngeschrevenCommandReply struct {
	CommandReference string `protobuf:"bytes,1,opt,name=commandReference,proto3" json:"commandReference,omitempty"`
	PersonReference  []byte `protobuf:"bytes,2,opt,name=personReference,proto3" json:"personReference,omitempty"`
	// contains filtered or unexported fields
}

func (*PersoonIngeschrevenCommandReply) Descriptor deprecated

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

Deprecated: Use PersoonIngeschrevenCommandReply.ProtoReflect.Descriptor instead.

func (*PersoonIngeschrevenCommandReply) GetCommandReference

func (x *PersoonIngeschrevenCommandReply) GetCommandReference() string

func (*PersoonIngeschrevenCommandReply) GetPersonReference

func (x *PersoonIngeschrevenCommandReply) GetPersonReference() []byte

func (*PersoonIngeschrevenCommandReply) ProtoMessage

func (*PersoonIngeschrevenCommandReply) ProtoMessage()

func (*PersoonIngeschrevenCommandReply) ProtoReflect

func (*PersoonIngeschrevenCommandReply) Reset

func (*PersoonIngeschrevenCommandReply) String

type StatusReply

type StatusReply struct {
	Journaled bool `protobuf:"varint,1,opt,name=journaled,proto3" json:"journaled,omitempty"` // gelinkt in journaal
	Published bool `protobuf:"varint,2,opt,name=published,proto3" json:"published,omitempty"` // publiek bekend
	// contains filtered or unexported fields
}

func (*StatusReply) Descriptor deprecated

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

Deprecated: Use StatusReply.ProtoReflect.Descriptor instead.

func (*StatusReply) GetJournaled

func (x *StatusReply) GetJournaled() bool

func (*StatusReply) GetPublished

func (x *StatusReply) GetPublished() bool

func (*StatusReply) ProtoMessage

func (*StatusReply) ProtoMessage()

func (*StatusReply) ProtoReflect

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

func (*StatusReply) Reset

func (x *StatusReply) Reset()

func (*StatusReply) String

func (x *StatusReply) String() string

type StatusRequest

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

func (*StatusRequest) Descriptor deprecated

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

Deprecated: Use StatusRequest.ProtoReflect.Descriptor instead.

func (*StatusRequest) GetCommandReference

func (x *StatusRequest) GetCommandReference() string

func (*StatusRequest) ProtoMessage

func (*StatusRequest) ProtoMessage()

func (*StatusRequest) ProtoReflect

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

func (*StatusRequest) Reset

func (x *StatusRequest) Reset()

func (*StatusRequest) String

func (x *StatusRequest) String() string

type UnimplementedCommandServer

type UnimplementedCommandServer struct {
}

UnimplementedCommandServer must be embedded to have forward compatible implementations.

func (UnimplementedCommandServer) BSNToegekend

func (UnimplementedCommandServer) GeslachtsaanduidingGeregistreerd

func (UnimplementedCommandServer) NamenGeregistreerd

func (UnimplementedCommandServer) NamenVastgesteld

func (UnimplementedCommandServer) NewPerson

func (UnimplementedCommandServer) PersonNote

func (UnimplementedCommandServer) Status

func (UnimplementedCommandServer) WoonadresNLGeregistreerd

type UnsafeCommandServer

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

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

Jump to

Keyboard shortcuts

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