proto

package
v0.0.0-...-bb65b11 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2024 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Auth_Authenticate_FullMethodName = "/proto.Auth/Authenticate"
)
View Source
const (
	Notify_NotifyUser_FullMethodName = "/proto.Notify/NotifyUser"
)

Variables

View Source
var Auth_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "proto.Auth",
	HandlerType: (*AuthServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Authenticate",
			Handler:    _Auth_Authenticate_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "auth.proto",
}

Auth_ServiceDesc is the grpc.ServiceDesc for Auth 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_notify_proto protoreflect.FileDescriptor
View Source
var Notify_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "proto.Notify",
	HandlerType: (*NotifyServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "NotifyUser",
			Handler:    _Notify_NotifyUser_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "notify.proto",
}

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

Functions

func RegisterAuthServer

func RegisterAuthServer(s grpc.ServiceRegistrar, srv AuthServer)

func RegisterNotifyServer

func RegisterNotifyServer(s grpc.ServiceRegistrar, srv NotifyServer)

Types

type AuthClient

type AuthClient interface {
	Authenticate(ctx context.Context, in *AuthRequest, opts ...grpc.CallOption) (*AuthReply, error)
}

AuthClient is the client API for Auth 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 NewAuthClient

func NewAuthClient(cc grpc.ClientConnInterface) AuthClient

type AuthReply

type AuthReply struct {
	IsValid      bool      `protobuf:"varint,1,opt,name=is_valid,json=isValid,proto3" json:"is_valid,omitempty"`
	AccessToken  *string   `protobuf:"bytes,2,opt,name=access_token,json=accessToken,proto3,oneof" json:"access_token,omitempty"`
	RefreshToken *string   `protobuf:"bytes,3,opt,name=refresh_token,json=refreshToken,proto3,oneof" json:"refresh_token,omitempty"`
	Userinfo     *Userinfo `protobuf:"bytes,4,opt,name=userinfo,proto3,oneof" json:"userinfo,omitempty"`
	// contains filtered or unexported fields
}

func (*AuthReply) Descriptor deprecated

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

Deprecated: Use AuthReply.ProtoReflect.Descriptor instead.

func (*AuthReply) GetAccessToken

func (x *AuthReply) GetAccessToken() string

func (*AuthReply) GetIsValid

func (x *AuthReply) GetIsValid() bool

func (*AuthReply) GetRefreshToken

func (x *AuthReply) GetRefreshToken() string

func (*AuthReply) GetUserinfo

func (x *AuthReply) GetUserinfo() *Userinfo

func (*AuthReply) ProtoMessage

func (*AuthReply) ProtoMessage()

func (*AuthReply) ProtoReflect

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

func (*AuthReply) Reset

func (x *AuthReply) Reset()

func (*AuthReply) String

func (x *AuthReply) String() string

type AuthRequest

type AuthRequest struct {
	AccessToken  string  `protobuf:"bytes,1,opt,name=access_token,json=accessToken,proto3" json:"access_token,omitempty"`
	RefreshToken *string `protobuf:"bytes,2,opt,name=refresh_token,json=refreshToken,proto3,oneof" json:"refresh_token,omitempty"`
	// contains filtered or unexported fields
}

func (*AuthRequest) Descriptor deprecated

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

Deprecated: Use AuthRequest.ProtoReflect.Descriptor instead.

func (*AuthRequest) GetAccessToken

func (x *AuthRequest) GetAccessToken() string

func (*AuthRequest) GetRefreshToken

func (x *AuthRequest) GetRefreshToken() string

func (*AuthRequest) ProtoMessage

func (*AuthRequest) ProtoMessage()

func (*AuthRequest) ProtoReflect

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

func (*AuthRequest) Reset

func (x *AuthRequest) Reset()

func (*AuthRequest) String

func (x *AuthRequest) String() string

type AuthServer

type AuthServer interface {
	Authenticate(context.Context, *AuthRequest) (*AuthReply, error)
	// contains filtered or unexported methods
}

AuthServer is the server API for Auth service. All implementations must embed UnimplementedAuthServer for forward compatibility

type NotifyClient

type NotifyClient interface {
	NotifyUser(ctx context.Context, in *NotifyRequest, opts ...grpc.CallOption) (*NotifyReply, error)
}

NotifyClient is the client API for Notify 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 NewNotifyClient

func NewNotifyClient(cc grpc.ClientConnInterface) NotifyClient
type NotifyLink struct {
	Label string `protobuf:"bytes,1,opt,name=label,proto3" json:"label,omitempty"`
	Url   string `protobuf:"bytes,2,opt,name=url,proto3" json:"url,omitempty"`
	// contains filtered or unexported fields
}

func (*NotifyLink) Descriptor deprecated

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

Deprecated: Use NotifyLink.ProtoReflect.Descriptor instead.

func (*NotifyLink) GetLabel

func (x *NotifyLink) GetLabel() string

func (*NotifyLink) GetUrl

func (x *NotifyLink) GetUrl() string

func (*NotifyLink) ProtoMessage

func (*NotifyLink) ProtoMessage()

func (*NotifyLink) ProtoReflect

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

func (*NotifyLink) Reset

func (x *NotifyLink) Reset()

func (*NotifyLink) String

func (x *NotifyLink) String() string

type NotifyReply

type NotifyReply struct {
	IsSent bool `protobuf:"varint,1,opt,name=is_sent,json=isSent,proto3" json:"is_sent,omitempty"`
	// contains filtered or unexported fields
}

func (*NotifyReply) Descriptor deprecated

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

Deprecated: Use NotifyReply.ProtoReflect.Descriptor instead.

func (*NotifyReply) GetIsSent

func (x *NotifyReply) GetIsSent() bool

func (*NotifyReply) ProtoMessage

func (*NotifyReply) ProtoMessage()

func (*NotifyReply) ProtoReflect

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

func (*NotifyReply) Reset

func (x *NotifyReply) Reset()

func (*NotifyReply) String

func (x *NotifyReply) String() string

type NotifyRequest

type NotifyRequest struct {
	Subject      string        `protobuf:"bytes,1,opt,name=subject,proto3" json:"subject,omitempty"`
	Content      string        `protobuf:"bytes,2,opt,name=content,proto3" json:"content,omitempty"`
	Links        []*NotifyLink `protobuf:"bytes,3,rep,name=links,proto3" json:"links,omitempty"`
	IsImportant  bool          `protobuf:"varint,4,opt,name=is_important,json=isImportant,proto3" json:"is_important,omitempty"`
	RecipientId  uint64        `protobuf:"varint,5,opt,name=recipient_id,json=recipientId,proto3" json:"recipient_id,omitempty"`
	ClientId     string        `protobuf:"bytes,6,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"`
	ClientSecret string        `protobuf:"bytes,7,opt,name=client_secret,json=clientSecret,proto3" json:"client_secret,omitempty"`
	// contains filtered or unexported fields
}

func (*NotifyRequest) Descriptor deprecated

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

Deprecated: Use NotifyRequest.ProtoReflect.Descriptor instead.

func (*NotifyRequest) GetClientId

func (x *NotifyRequest) GetClientId() string

func (*NotifyRequest) GetClientSecret

func (x *NotifyRequest) GetClientSecret() string

func (*NotifyRequest) GetContent

func (x *NotifyRequest) GetContent() string

func (*NotifyRequest) GetIsImportant

func (x *NotifyRequest) GetIsImportant() bool
func (x *NotifyRequest) GetLinks() []*NotifyLink

func (*NotifyRequest) GetRecipientId

func (x *NotifyRequest) GetRecipientId() uint64

func (*NotifyRequest) GetSubject

func (x *NotifyRequest) GetSubject() string

func (*NotifyRequest) ProtoMessage

func (*NotifyRequest) ProtoMessage()

func (*NotifyRequest) ProtoReflect

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

func (*NotifyRequest) Reset

func (x *NotifyRequest) Reset()

func (*NotifyRequest) String

func (x *NotifyRequest) String() string

type NotifyServer

type NotifyServer interface {
	NotifyUser(context.Context, *NotifyRequest) (*NotifyReply, error)
	// contains filtered or unexported methods
}

NotifyServer is the server API for Notify service. All implementations must embed UnimplementedNotifyServer for forward compatibility

type UnimplementedAuthServer

type UnimplementedAuthServer struct {
}

UnimplementedAuthServer must be embedded to have forward compatible implementations.

func (UnimplementedAuthServer) Authenticate

type UnimplementedNotifyServer

type UnimplementedNotifyServer struct {
}

UnimplementedNotifyServer must be embedded to have forward compatible implementations.

func (UnimplementedNotifyServer) NotifyUser

type UnsafeAuthServer

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

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

type UnsafeNotifyServer

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

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

type Userinfo

type Userinfo struct {
	Id          uint64  `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Name        string  `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	Nick        string  `protobuf:"bytes,3,opt,name=nick,proto3" json:"nick,omitempty"`
	Email       string  `protobuf:"bytes,4,opt,name=email,proto3" json:"email,omitempty"`
	Avatar      string  `protobuf:"bytes,5,opt,name=avatar,proto3" json:"avatar,omitempty"`
	Description *string `protobuf:"bytes,6,opt,name=description,proto3,oneof" json:"description,omitempty"`
	// contains filtered or unexported fields
}

func (*Userinfo) Descriptor deprecated

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

Deprecated: Use Userinfo.ProtoReflect.Descriptor instead.

func (*Userinfo) GetAvatar

func (x *Userinfo) GetAvatar() string

func (*Userinfo) GetDescription

func (x *Userinfo) GetDescription() string

func (*Userinfo) GetEmail

func (x *Userinfo) GetEmail() string

func (*Userinfo) GetId

func (x *Userinfo) GetId() uint64

func (*Userinfo) GetName

func (x *Userinfo) GetName() string

func (*Userinfo) GetNick

func (x *Userinfo) GetNick() string

func (*Userinfo) ProtoMessage

func (*Userinfo) ProtoMessage()

func (*Userinfo) ProtoReflect

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

func (*Userinfo) Reset

func (x *Userinfo) Reset()

func (*Userinfo) String

func (x *Userinfo) String() string

Jump to

Keyboard shortcuts

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