Documentation ¶
Index ¶
- Variables
- func RegisterAuthDBServiceServer(s grpc.ServiceRegistrar, srv AuthDBServiceServer)
- func RegisterAuthServiceServer(s grpc.ServiceRegistrar, srv AuthServiceServer)
- type ACL
- type AuthDBServiceClient
- type AuthDBServiceServer
- type AuthReq
- type AuthResp
- func (*AuthResp) Descriptor() ([]byte, []int)deprecated
- func (x *AuthResp) GetEmail() string
- func (x *AuthResp) GetErrorDescription() string
- func (x *AuthResp) GetExpiresAt() *timestamppb.Timestamp
- func (x *AuthResp) GetGroupId() string
- func (x *AuthResp) GetQuota() int32
- func (x *AuthResp) GetToken() *Token
- func (*AuthResp) ProtoMessage()
- func (x *AuthResp) ProtoReflect() protoreflect.Message
- func (x *AuthResp) Reset()
- func (x *AuthResp) String() string
- type AuthServiceClient
- type AuthServiceServer
- type CheckMembershipReq
- func (*CheckMembershipReq) Descriptor() ([]byte, []int)deprecated
- func (x *CheckMembershipReq) GetEmail() string
- func (x *CheckMembershipReq) GetGroup() string
- func (*CheckMembershipReq) ProtoMessage()
- func (x *CheckMembershipReq) ProtoReflect() protoreflect.Message
- func (x *CheckMembershipReq) Reset()
- func (x *CheckMembershipReq) String() string
- type CheckMembershipResp
- func (*CheckMembershipResp) Descriptor() ([]byte, []int)deprecated
- func (x *CheckMembershipResp) GetIsMember() bool
- func (*CheckMembershipResp) ProtoMessage()
- func (x *CheckMembershipResp) ProtoReflect() protoreflect.Message
- func (x *CheckMembershipResp) Reset()
- func (x *CheckMembershipResp) String() string
- type Group
- func (*Group) Descriptor() ([]byte, []int)deprecated
- func (x *Group) GetAudience() string
- func (x *Group) GetDescription() string
- func (x *Group) GetDomains() []string
- func (x *Group) GetEmails() []string
- func (x *Group) GetId() string
- func (x *Group) GetReject() bool
- func (x *Group) GetServiceAccount() string
- func (*Group) ProtoMessage()
- func (x *Group) ProtoReflect() protoreflect.Message
- func (x *Group) Reset()
- func (x *Group) String() string
- type Token
- type UnimplementedAuthDBServiceServer
- type UnimplementedAuthServiceServer
- type UnsafeAuthDBServiceServer
- type UnsafeAuthServiceServer
Constants ¶
This section is empty.
Variables ¶
var AuthDBService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "auth.AuthDBService", HandlerType: (*AuthDBServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "CheckMembership", Handler: _AuthDBService_CheckMembership_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "auth/authdb_service.proto", }
AuthDBService_ServiceDesc is the grpc.ServiceDesc for AuthDBService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var AuthService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "auth.AuthService", HandlerType: (*AuthServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Auth", Handler: _AuthService_Auth_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "auth/auth_service.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_acl_proto protoreflect.FileDescriptor
var File_auth_auth_proto protoreflect.FileDescriptor
var File_auth_auth_service_proto protoreflect.FileDescriptor
var File_auth_authdb_proto protoreflect.FileDescriptor
var File_auth_authdb_service_proto protoreflect.FileDescriptor
Functions ¶
func RegisterAuthDBServiceServer ¶
func RegisterAuthDBServiceServer(s grpc.ServiceRegistrar, srv AuthDBServiceServer)
func RegisterAuthServiceServer ¶
func RegisterAuthServiceServer(s grpc.ServiceRegistrar, srv AuthServiceServer)
Types ¶
type ACL ¶
type ACL struct { // First matched group will be used. Groups []*Group `protobuf:"bytes,1,rep,name=groups,proto3" json:"groups,omitempty"` // contains filtered or unexported fields }
func (*ACL) Descriptor
deprecated
func (*ACL) ProtoMessage ¶
func (*ACL) ProtoMessage()
func (*ACL) ProtoReflect ¶ added in v0.0.12
func (x *ACL) ProtoReflect() protoreflect.Message
type AuthDBServiceClient ¶
type AuthDBServiceClient interface {
CheckMembership(ctx context.Context, in *CheckMembershipReq, opts ...grpc.CallOption) (*CheckMembershipResp, error)
}
AuthDBServiceClient is the client API for AuthDBService 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 NewAuthDBServiceClient ¶
func NewAuthDBServiceClient(cc grpc.ClientConnInterface) AuthDBServiceClient
type AuthDBServiceServer ¶
type AuthDBServiceServer interface { CheckMembership(context.Context, *CheckMembershipReq) (*CheckMembershipResp, error) // contains filtered or unexported methods }
AuthDBServiceServer is the server API for AuthDBService service. All implementations must embed UnimplementedAuthDBServiceServer for forward compatibility
type AuthReq ¶
type AuthReq struct { Authorization string `protobuf:"bytes,1,opt,name=authorization,proto3" json:"authorization,omitempty"` // contains filtered or unexported fields }
func (*AuthReq) Descriptor
deprecated
func (*AuthReq) GetAuthorization ¶
func (*AuthReq) ProtoMessage ¶
func (*AuthReq) ProtoMessage()
func (*AuthReq) ProtoReflect ¶ added in v0.0.12
func (x *AuthReq) ProtoReflect() protoreflect.Message
type AuthResp ¶
type AuthResp struct { Email string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"` ExpiresAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=expires_at,json=expiresAt,proto3" json:"expires_at,omitempty"` // number of requests allowed until expire. // -1 means unlimited. 0 means disallow. Quota int32 `protobuf:"varint,4,opt,name=quota,proto3" json:"quota,omitempty"` // TODO: group quota? // error description for user. ErrorDescription string `protobuf:"bytes,5,opt,name=error_description,json=errorDescription,proto3" json:"error_description,omitempty"` Token *Token `protobuf:"bytes,7,opt,name=token,proto3" json:"token,omitempty"` // group that email belongs to. GroupId string `protobuf:"bytes,8,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"` // contains filtered or unexported fields }
func (*AuthResp) Descriptor
deprecated
func (*AuthResp) GetErrorDescription ¶
func (*AuthResp) GetExpiresAt ¶
func (x *AuthResp) GetExpiresAt() *timestamppb.Timestamp
func (*AuthResp) GetGroupId ¶
func (*AuthResp) ProtoMessage ¶
func (*AuthResp) ProtoMessage()
func (*AuthResp) ProtoReflect ¶ added in v0.0.12
func (x *AuthResp) ProtoReflect() protoreflect.Message
type AuthServiceClient ¶
type AuthServiceClient interface {
Auth(ctx context.Context, in *AuthReq, opts ...grpc.CallOption) (*AuthResp, 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.
func NewAuthServiceClient ¶
func NewAuthServiceClient(cc grpc.ClientConnInterface) AuthServiceClient
type AuthServiceServer ¶
type AuthServiceServer interface { Auth(context.Context, *AuthReq) (*AuthResp, error) // contains filtered or unexported methods }
AuthServiceServer is the server API for AuthService service. All implementations must embed UnimplementedAuthServiceServer for forward compatibility
type CheckMembershipReq ¶
type CheckMembershipReq struct { Email string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"` Group string `protobuf:"bytes,2,opt,name=group,proto3" json:"group,omitempty"` // contains filtered or unexported fields }
func (*CheckMembershipReq) Descriptor
deprecated
func (*CheckMembershipReq) Descriptor() ([]byte, []int)
Deprecated: Use CheckMembershipReq.ProtoReflect.Descriptor instead.
func (*CheckMembershipReq) GetEmail ¶
func (x *CheckMembershipReq) GetEmail() string
func (*CheckMembershipReq) GetGroup ¶
func (x *CheckMembershipReq) GetGroup() string
func (*CheckMembershipReq) ProtoMessage ¶
func (*CheckMembershipReq) ProtoMessage()
func (*CheckMembershipReq) ProtoReflect ¶ added in v0.0.12
func (x *CheckMembershipReq) ProtoReflect() protoreflect.Message
func (*CheckMembershipReq) Reset ¶
func (x *CheckMembershipReq) Reset()
func (*CheckMembershipReq) String ¶
func (x *CheckMembershipReq) String() string
type CheckMembershipResp ¶
type CheckMembershipResp struct { IsMember bool `protobuf:"varint,1,opt,name=is_member,json=isMember,proto3" json:"is_member,omitempty"` // contains filtered or unexported fields }
func (*CheckMembershipResp) Descriptor
deprecated
func (*CheckMembershipResp) Descriptor() ([]byte, []int)
Deprecated: Use CheckMembershipResp.ProtoReflect.Descriptor instead.
func (*CheckMembershipResp) GetIsMember ¶
func (x *CheckMembershipResp) GetIsMember() bool
func (*CheckMembershipResp) ProtoMessage ¶
func (*CheckMembershipResp) ProtoMessage()
func (*CheckMembershipResp) ProtoReflect ¶ added in v0.0.12
func (x *CheckMembershipResp) ProtoReflect() protoreflect.Message
func (*CheckMembershipResp) Reset ¶
func (x *CheckMembershipResp) Reset()
func (*CheckMembershipResp) String ¶
func (x *CheckMembershipResp) String() string
type Group ¶
type Group struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` // if audience is not empty, group member should have this audience // in the token. Audience string `protobuf:"bytes,3,opt,name=audience,proto3" json:"audience,omitempty"` // matches mail in the token. Emails []string `protobuf:"bytes,4,rep,name=emails,proto3" json:"emails,omitempty"` // matches domain part of email in the token. Domains []string `protobuf:"bytes,5,rep,name=domains,proto3" json:"domains,omitempty"` // use this service account for this group. // it is used to read json in service-accounts volume. // If service_account is "default", use server's default service account. // If service_account is empty, pass EUC as is. ServiceAccount string `protobuf:"bytes,6,opt,name=service_account,json=serviceAccount,proto3" json:"service_account,omitempty"` // If reject is true, deny access from this group. Reject bool `protobuf:"varint,7,opt,name=reject,proto3" json:"reject,omitempty"` // contains filtered or unexported fields }
Group defines a group of users that shares the same service account. Different groups may share a service account.
func (*Group) Descriptor
deprecated
func (*Group) GetAudience ¶
func (*Group) GetDescription ¶
func (*Group) GetDomains ¶
func (*Group) GetServiceAccount ¶
func (*Group) ProtoMessage ¶
func (*Group) ProtoMessage()
func (*Group) ProtoReflect ¶ added in v0.0.12
func (x *Group) ProtoReflect() protoreflect.Message
type Token ¶
type Token struct { AccessToken string `protobuf:"bytes,1,opt,name=access_token,json=accessToken,proto3" json:"access_token,omitempty"` TokenType string `protobuf:"bytes,2,opt,name=token_type,json=tokenType,proto3" json:"token_type,omitempty"` // contains filtered or unexported fields }
func (*Token) Descriptor
deprecated
func (*Token) GetAccessToken ¶
func (*Token) GetTokenType ¶
func (*Token) ProtoMessage ¶
func (*Token) ProtoMessage()
func (*Token) ProtoReflect ¶ added in v0.0.12
func (x *Token) ProtoReflect() protoreflect.Message
type UnimplementedAuthDBServiceServer ¶ added in v0.0.5
type UnimplementedAuthDBServiceServer struct { }
UnimplementedAuthDBServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedAuthDBServiceServer) CheckMembership ¶ added in v0.0.5
func (UnimplementedAuthDBServiceServer) CheckMembership(context.Context, *CheckMembershipReq) (*CheckMembershipResp, error)
type UnimplementedAuthServiceServer ¶ added in v0.0.5
type UnimplementedAuthServiceServer struct { }
UnimplementedAuthServiceServer must be embedded to have forward compatible implementations.
type UnsafeAuthDBServiceServer ¶ added in v0.0.18
type UnsafeAuthDBServiceServer interface {
// contains filtered or unexported methods
}
UnsafeAuthDBServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to AuthDBServiceServer will result in compilation errors.
type UnsafeAuthServiceServer ¶ added in v0.0.18
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.