pb

package
v0.0.0-...-a6521f5 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Email_Send_FullMethodName = "/notification.Email/Send"
)
View Source
const (
	Ntfy_Send_FullMethodName = "/notification.Ntfy/Send"
)

Variables

View Source
var (
	Mail_ContentType_name = map[int32]string{
		0: "TEXT_HTML",
		1: "TEXT_PLAIN",
	}
	Mail_ContentType_value = map[string]int32{
		"TEXT_HTML":  0,
		"TEXT_PLAIN": 1,
	}
)

Enum value maps for Mail_ContentType.

View Source
var Email_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "notification.Email",
	HandlerType: (*EmailServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Send",
			Handler:    _Email_Send_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "email.proto",
}

Email_ServiceDesc is the grpc.ServiceDesc for Email 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_email_proto protoreflect.FileDescriptor
View Source
var Ntfy_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "notification.Ntfy",
	HandlerType: (*NtfyServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Send",
			Handler:    _Ntfy_Send_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "ntfy.proto",
}

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

Functions

func RegisterEmailServer

func RegisterEmailServer(s grpc.ServiceRegistrar, srv EmailServer)

func RegisterNtfyServer

func RegisterNtfyServer(s grpc.ServiceRegistrar, srv NtfyServer)

Types

type Contact

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

func (*Contact) Descriptor deprecated

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

Deprecated: Use Contact.ProtoReflect.Descriptor instead.

func (*Contact) GetAddress

func (x *Contact) GetAddress() string

func (*Contact) GetName

func (x *Contact) GetName() string

func (*Contact) ProtoMessage

func (*Contact) ProtoMessage()

func (*Contact) ProtoReflect

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

func (*Contact) Reset

func (x *Contact) Reset()

func (*Contact) String

func (x *Contact) String() string

type EmailClient

type EmailClient interface {
	Send(ctx context.Context, in *Mail, opts ...grpc.CallOption) (*wrapperspb.StringValue, error)
}

EmailClient is the client API for Email 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 NewEmailClient

func NewEmailClient(cc grpc.ClientConnInterface) EmailClient

type EmailServer

type EmailServer interface {
	Send(context.Context, *Mail) (*wrapperspb.StringValue, error)
	// contains filtered or unexported methods
}

EmailServer is the server API for Email service. All implementations must embed UnimplementedEmailServer for forward compatibility.

type Mail

type Mail struct {
	To          []*Contact       `protobuf:"bytes,1,rep,name=to,proto3" json:"to,omitempty"`
	Cc          []*Contact       `protobuf:"bytes,2,rep,name=cc,proto3" json:"cc,omitempty"`
	Bcc         []*Contact       `protobuf:"bytes,3,rep,name=bcc,proto3" json:"bcc,omitempty"`
	Subject     string           `protobuf:"bytes,4,opt,name=subject,proto3" json:"subject,omitempty"`
	Body        string           `protobuf:"bytes,5,opt,name=body,proto3" json:"body,omitempty"`
	ContentType Mail_ContentType `` /* 130-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*Mail) Descriptor deprecated

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

Deprecated: Use Mail.ProtoReflect.Descriptor instead.

func (*Mail) GetBcc

func (x *Mail) GetBcc() []*Contact

func (*Mail) GetBody

func (x *Mail) GetBody() string

func (*Mail) GetCc

func (x *Mail) GetCc() []*Contact

func (*Mail) GetContentType

func (x *Mail) GetContentType() Mail_ContentType

func (*Mail) GetSubject

func (x *Mail) GetSubject() string

func (*Mail) GetTo

func (x *Mail) GetTo() []*Contact

func (*Mail) ProtoMessage

func (*Mail) ProtoMessage()

func (*Mail) ProtoReflect

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

func (*Mail) Reset

func (x *Mail) Reset()

func (*Mail) String

func (x *Mail) String() string

type Mail_ContentType

type Mail_ContentType int32
const (
	Mail_TEXT_HTML  Mail_ContentType = 0
	Mail_TEXT_PLAIN Mail_ContentType = 1
)

func (Mail_ContentType) Descriptor

func (Mail_ContentType) Enum

func (Mail_ContentType) EnumDescriptor deprecated

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

Deprecated: Use Mail_ContentType.Descriptor instead.

func (Mail_ContentType) Number

func (Mail_ContentType) String

func (x Mail_ContentType) String() string

func (Mail_ContentType) Type

type Msg

type Msg struct {
	Topic    string   `protobuf:"bytes,1,opt,name=topic,proto3" json:"topic,omitempty"`
	Message  string   `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
	Title    string   `protobuf:"bytes,3,opt,name=title,proto3" json:"title,omitempty"`
	Priority int64    `protobuf:"varint,4,opt,name=priority,proto3" json:"priority,omitempty"`
	Attach   string   `protobuf:"bytes,5,opt,name=attach,proto3" json:"attach,omitempty"`
	Tags     []string `protobuf:"bytes,6,rep,name=tags,proto3" json:"tags,omitempty"`
	// contains filtered or unexported fields
}

func (*Msg) Descriptor deprecated

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

Deprecated: Use Msg.ProtoReflect.Descriptor instead.

func (*Msg) GetAttach

func (x *Msg) GetAttach() string

func (*Msg) GetMessage

func (x *Msg) GetMessage() string

func (*Msg) GetPriority

func (x *Msg) GetPriority() int64

func (*Msg) GetTags

func (x *Msg) GetTags() []string

func (*Msg) GetTitle

func (x *Msg) GetTitle() string

func (*Msg) GetTopic

func (x *Msg) GetTopic() string

func (*Msg) ProtoMessage

func (*Msg) ProtoMessage()

func (*Msg) ProtoReflect

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

func (*Msg) Reset

func (x *Msg) Reset()

func (*Msg) String

func (x *Msg) String() string

type NtfyClient

type NtfyClient interface {
	Send(ctx context.Context, in *Msg, opts ...grpc.CallOption) (*wrapperspb.StringValue, error)
}

NtfyClient is the client API for Ntfy 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 NewNtfyClient

func NewNtfyClient(cc grpc.ClientConnInterface) NtfyClient

type NtfyServer

type NtfyServer interface {
	Send(context.Context, *Msg) (*wrapperspb.StringValue, error)
	// contains filtered or unexported methods
}

NtfyServer is the server API for Ntfy service. All implementations must embed UnimplementedNtfyServer for forward compatibility.

type UnimplementedEmailServer

type UnimplementedEmailServer struct{}

UnimplementedEmailServer 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 (UnimplementedEmailServer) Send

type UnimplementedNtfyServer

type UnimplementedNtfyServer struct{}

UnimplementedNtfyServer 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 (UnimplementedNtfyServer) Send

type UnsafeEmailServer

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

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

type UnsafeNtfyServer

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

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

Jump to

Keyboard shortcuts

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