Documentation
¶
Index ¶
- Constants
- Variables
- func RegisterAuthServiceServer(s grpc.ServiceRegistrar, srv AuthServiceServer)
- type AuthNReq
- type AuthNRes
- func (*AuthNRes) Descriptor() ([]byte, []int)deprecated
- func (x *AuthNRes) GetDomainId() string
- func (x *AuthNRes) GetId() string
- func (x *AuthNRes) GetUserId() string
- func (*AuthNRes) ProtoMessage()
- func (x *AuthNRes) ProtoReflect() protoreflect.Message
- func (x *AuthNRes) Reset()
- func (x *AuthNRes) String() string
- type AuthServiceClient
- type AuthServiceServer
- type AuthZReq
- func (*AuthZReq) Descriptor() ([]byte, []int)deprecated
- func (x *AuthZReq) GetDomain() string
- func (x *AuthZReq) GetObject() string
- func (x *AuthZReq) GetObjectType() string
- func (x *AuthZReq) GetPermission() string
- func (x *AuthZReq) GetRelation() string
- func (x *AuthZReq) GetSubject() string
- func (x *AuthZReq) GetSubjectKind() string
- func (x *AuthZReq) GetSubjectRelation() string
- func (x *AuthZReq) GetSubjectType() string
- func (*AuthZReq) ProtoMessage()
- func (x *AuthZReq) ProtoReflect() protoreflect.Message
- func (x *AuthZReq) Reset()
- func (x *AuthZReq) String() string
- type AuthZRes
- type UnimplementedAuthServiceServer
- type UnsafeAuthServiceServer
Constants ¶
const ( AuthService_Authorize_FullMethodName = "/auth.v1.AuthService/Authorize" AuthService_Authenticate_FullMethodName = "/auth.v1.AuthService/Authenticate" )
Variables ¶
var AuthService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "auth.v1.AuthService", HandlerType: (*AuthServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Authorize", Handler: _AuthService_Authorize_Handler, }, { MethodName: "Authenticate", Handler: _AuthService_Authenticate_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "auth/v1/auth.proto", }
AuthService_ServiceDesc is the grpc.ServiceDesc for AuthService 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_v1_auth_proto protoreflect.FileDescriptor
Functions ¶
func RegisterAuthServiceServer ¶
func RegisterAuthServiceServer(s grpc.ServiceRegistrar, srv AuthServiceServer)
Types ¶
type AuthNReq ¶
type AuthNReq struct { Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` // contains filtered or unexported fields }
func (*AuthNReq) Descriptor
deprecated
func (*AuthNReq) ProtoMessage ¶
func (*AuthNReq) ProtoMessage()
func (*AuthNReq) ProtoReflect ¶
func (x *AuthNReq) ProtoReflect() protoreflect.Message
type AuthNRes ¶
type AuthNRes struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // id UserId string `protobuf:"bytes,2,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` // user id DomainId string `protobuf:"bytes,3,opt,name=domain_id,json=domainId,proto3" json:"domain_id,omitempty"` // domain id // contains filtered or unexported fields }
func (*AuthNRes) Descriptor
deprecated
func (*AuthNRes) GetDomainId ¶
func (*AuthNRes) ProtoMessage ¶
func (*AuthNRes) ProtoMessage()
func (*AuthNRes) ProtoReflect ¶
func (x *AuthNRes) ProtoReflect() protoreflect.Message
type AuthServiceClient ¶
type AuthServiceClient interface { Authorize(ctx context.Context, in *AuthZReq, opts ...grpc.CallOption) (*AuthZRes, error) Authenticate(ctx context.Context, in *AuthNReq, opts ...grpc.CallOption) (*AuthNRes, error) }
AuthServiceClient is the client API for AuthService 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.
AuthService is a service that provides authentication and authorization functionalities for SuperMQ services.
func NewAuthServiceClient ¶
func NewAuthServiceClient(cc grpc.ClientConnInterface) AuthServiceClient
type AuthServiceServer ¶
type AuthServiceServer interface { Authorize(context.Context, *AuthZReq) (*AuthZRes, error) Authenticate(context.Context, *AuthNReq) (*AuthNRes, error) // contains filtered or unexported methods }
AuthServiceServer is the server API for AuthService service. All implementations must embed UnimplementedAuthServiceServer for forward compatibility.
AuthService is a service that provides authentication and authorization functionalities for SuperMQ services.
type AuthZReq ¶
type AuthZReq struct { Domain string `protobuf:"bytes,1,opt,name=domain,proto3" json:"domain,omitempty"` // Domain SubjectType string `protobuf:"bytes,2,opt,name=subject_type,json=subjectType,proto3" json:"subject_type,omitempty"` // Client or User SubjectKind string `protobuf:"bytes,3,opt,name=subject_kind,json=subjectKind,proto3" json:"subject_kind,omitempty"` // ID or Token SubjectRelation string `protobuf:"bytes,4,opt,name=subject_relation,json=subjectRelation,proto3" json:"subject_relation,omitempty"` // Subject relation Subject string `protobuf:"bytes,5,opt,name=subject,proto3" json:"subject,omitempty"` // Subject value (id or token, depending on kind) Relation string `protobuf:"bytes,6,opt,name=relation,proto3" json:"relation,omitempty"` // Relation to filter Permission string `protobuf:"bytes,7,opt,name=permission,proto3" json:"permission,omitempty"` // Action Object string `protobuf:"bytes,8,opt,name=object,proto3" json:"object,omitempty"` // Object ID ObjectType string `protobuf:"bytes,9,opt,name=object_type,json=objectType,proto3" json:"object_type,omitempty"` // Client, User, Group // contains filtered or unexported fields }
func (*AuthZReq) Descriptor
deprecated
func (*AuthZReq) GetObjectType ¶
func (*AuthZReq) GetPermission ¶
func (*AuthZReq) GetRelation ¶
func (*AuthZReq) GetSubject ¶
func (*AuthZReq) GetSubjectKind ¶
func (*AuthZReq) GetSubjectRelation ¶
func (*AuthZReq) GetSubjectType ¶
func (*AuthZReq) ProtoMessage ¶
func (*AuthZReq) ProtoMessage()
func (*AuthZReq) ProtoReflect ¶
func (x *AuthZReq) ProtoReflect() protoreflect.Message
type AuthZRes ¶
type AuthZRes struct { Authorized bool `protobuf:"varint,1,opt,name=authorized,proto3" json:"authorized,omitempty"` Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*AuthZRes) Descriptor
deprecated
func (*AuthZRes) GetAuthorized ¶
func (*AuthZRes) ProtoMessage ¶
func (*AuthZRes) ProtoMessage()
func (*AuthZRes) ProtoReflect ¶
func (x *AuthZRes) ProtoReflect() protoreflect.Message
type UnimplementedAuthServiceServer ¶
type UnimplementedAuthServiceServer struct{}
UnimplementedAuthServiceServer 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 (UnimplementedAuthServiceServer) Authenticate ¶
type UnsafeAuthServiceServer ¶
type UnsafeAuthServiceServer interface {
// contains filtered or unexported methods
}
UnsafeAuthServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to AuthServiceServer will result in compilation errors.