Documentation
¶
Index ¶
- Constants
- Variables
- func RegisterAuthServer(s grpc.ServiceRegistrar, srv AuthServer)
- func RegisterNotifyServer(s grpc.ServiceRegistrar, srv NotifyServer)
- type AuthClient
- type AuthReply
- func (*AuthReply) Descriptor() ([]byte, []int)deprecated
- func (x *AuthReply) GetAccessToken() string
- func (x *AuthReply) GetIsValid() bool
- func (x *AuthReply) GetRefreshToken() string
- func (x *AuthReply) GetUserinfo() *Userinfo
- func (*AuthReply) ProtoMessage()
- func (x *AuthReply) ProtoReflect() protoreflect.Message
- func (x *AuthReply) Reset()
- func (x *AuthReply) String() string
- type AuthRequest
- func (*AuthRequest) Descriptor() ([]byte, []int)deprecated
- func (x *AuthRequest) GetAccessToken() string
- func (x *AuthRequest) GetRefreshToken() string
- func (*AuthRequest) ProtoMessage()
- func (x *AuthRequest) ProtoReflect() protoreflect.Message
- func (x *AuthRequest) Reset()
- func (x *AuthRequest) String() string
- type AuthServer
- type NotifyClient
- type NotifyLink
- type NotifyReply
- type NotifyRequest
- func (*NotifyRequest) Descriptor() ([]byte, []int)deprecated
- func (x *NotifyRequest) GetClientId() string
- func (x *NotifyRequest) GetClientSecret() string
- func (x *NotifyRequest) GetContent() string
- func (x *NotifyRequest) GetIsImportant() bool
- func (x *NotifyRequest) GetLinks() []*NotifyLink
- func (x *NotifyRequest) GetRecipientId() uint64
- func (x *NotifyRequest) GetSubject() string
- func (*NotifyRequest) ProtoMessage()
- func (x *NotifyRequest) ProtoReflect() protoreflect.Message
- func (x *NotifyRequest) Reset()
- func (x *NotifyRequest) String() string
- type NotifyServer
- type UnimplementedAuthServer
- type UnimplementedNotifyServer
- type UnsafeAuthServer
- type UnsafeNotifyServer
- type Userinfo
- func (*Userinfo) Descriptor() ([]byte, []int)deprecated
- func (x *Userinfo) GetAvatar() string
- func (x *Userinfo) GetDescription() string
- func (x *Userinfo) GetEmail() string
- func (x *Userinfo) GetId() uint64
- func (x *Userinfo) GetName() string
- func (x *Userinfo) GetNick() string
- func (*Userinfo) ProtoMessage()
- func (x *Userinfo) ProtoReflect() protoreflect.Message
- func (x *Userinfo) Reset()
- func (x *Userinfo) String() string
Constants ¶
const (
Auth_Authenticate_FullMethodName = "/proto.Auth/Authenticate"
)
const (
Notify_NotifyUser_FullMethodName = "/proto.Notify/NotifyUser"
)
Variables ¶
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)
var File_auth_proto protoreflect.FileDescriptor
var File_notify_proto protoreflect.FileDescriptor
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://pkgo.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) GetAccessToken ¶
func (*AuthReply) GetIsValid ¶
func (*AuthReply) GetRefreshToken ¶
func (*AuthReply) GetUserinfo ¶
func (*AuthReply) ProtoMessage ¶
func (*AuthReply) ProtoMessage()
func (*AuthReply) ProtoReflect ¶
func (x *AuthReply) ProtoReflect() protoreflect.Message
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://pkgo.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewNotifyClient ¶
func NewNotifyClient(cc grpc.ClientConnInterface) NotifyClient
type NotifyLink ¶
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 (*NotifyRequest) GetLinks ¶
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 ¶
func (UnimplementedAuthServer) Authenticate(context.Context, *AuthRequest) (*AuthReply, error)
type UnimplementedNotifyServer ¶
type UnimplementedNotifyServer struct { }
UnimplementedNotifyServer must be embedded to have forward compatible implementations.
func (UnimplementedNotifyServer) NotifyUser ¶
func (UnimplementedNotifyServer) NotifyUser(context.Context, *NotifyRequest) (*NotifyReply, error)
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) GetDescription ¶
func (*Userinfo) ProtoMessage ¶
func (*Userinfo) ProtoMessage()
func (*Userinfo) ProtoReflect ¶
func (x *Userinfo) ProtoReflect() protoreflect.Message