protobufs

package
v1.6.4-rc4 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2024 License: MIT Imports: 8 Imported by: 0

README

To generate go code for the notifier.proto files, run :

protoc --go_out=. --go_opt=paths=source_relative \
    --go-grpc_out=. --go-grpc_opt=paths=source_relative \
    proto/alert.proto`

Documentation

Index

Constants

View Source
const (
	Notifier_Notify_FullMethodName    = "/proto.Notifier/Notify"
	Notifier_Configure_FullMethodName = "/proto.Notifier/Configure"
)

Variables

View Source
var File_notifier_proto protoreflect.FileDescriptor
View Source
var Notifier_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "proto.Notifier",
	HandlerType: (*NotifierServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Notify",
			Handler:    _Notifier_Notify_Handler,
		},
		{
			MethodName: "Configure",
			Handler:    _Notifier_Configure_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "notifier.proto",
}

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

Functions

func RegisterNotifierServer

func RegisterNotifierServer(s grpc.ServiceRegistrar, srv NotifierServer)

Types

type Config

type Config struct {
	Config []byte `protobuf:"bytes,2,opt,name=config,proto3" json:"config,omitempty"`
	// contains filtered or unexported fields
}

func (*Config) Descriptor deprecated

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

Deprecated: Use Config.ProtoReflect.Descriptor instead.

func (*Config) GetConfig

func (x *Config) GetConfig() []byte

func (*Config) ProtoMessage

func (*Config) ProtoMessage()

func (*Config) ProtoReflect

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

func (*Config) Reset

func (x *Config) Reset()

func (*Config) String

func (x *Config) String() string

type Empty

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

func (*Empty) Descriptor deprecated

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

Deprecated: Use Empty.ProtoReflect.Descriptor instead.

func (*Empty) ProtoMessage

func (*Empty) ProtoMessage()

func (*Empty) ProtoReflect

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

func (*Empty) Reset

func (x *Empty) Reset()

func (*Empty) String

func (x *Empty) String() string

type Notification

type Notification struct {
	Text string `protobuf:"bytes,1,opt,name=text,proto3" json:"text,omitempty"`
	Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	// contains filtered or unexported fields
}

func (*Notification) Descriptor deprecated

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

Deprecated: Use Notification.ProtoReflect.Descriptor instead.

func (*Notification) GetName

func (x *Notification) GetName() string

func (*Notification) GetText

func (x *Notification) GetText() string

func (*Notification) ProtoMessage

func (*Notification) ProtoMessage()

func (*Notification) ProtoReflect

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

func (*Notification) Reset

func (x *Notification) Reset()

func (*Notification) String

func (x *Notification) String() string

type NotifierClient

type NotifierClient interface {
	Notify(ctx context.Context, in *Notification, opts ...grpc.CallOption) (*Empty, error)
	Configure(ctx context.Context, in *Config, opts ...grpc.CallOption) (*Empty, error)
}

NotifierClient is the client API for Notifier 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 NewNotifierClient

func NewNotifierClient(cc grpc.ClientConnInterface) NotifierClient

type NotifierServer

type NotifierServer interface {
	Notify(context.Context, *Notification) (*Empty, error)
	Configure(context.Context, *Config) (*Empty, error)
	// contains filtered or unexported methods
}

NotifierServer is the server API for Notifier service. All implementations must embed UnimplementedNotifierServer for forward compatibility.

type UnimplementedNotifierServer

type UnimplementedNotifierServer struct{}

UnimplementedNotifierServer must be embedded to have forward compatible implementations.

NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.

func (UnimplementedNotifierServer) Configure

func (UnimplementedNotifierServer) Notify

type UnsafeNotifierServer

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

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

Jump to

Keyboard shortcuts

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