Documentation ¶
Index ¶
- Variables
- func RegisterPrincipalsServer(s grpc.ServiceRegistrar, srv PrincipalsServer)
- type EnsureRequest
- func (*EnsureRequest) Descriptor() ([]byte, []int)deprecated
- func (x *EnsureRequest) GetDelete() bool
- func (x *EnsureRequest) GetPrincipal() *Principal
- func (*EnsureRequest) ProtoMessage()
- func (x *EnsureRequest) ProtoReflect() protoreflect.Message
- func (x *EnsureRequest) Reset()
- func (x *EnsureRequest) String() string
- type EnsureResponse
- type ID
- func (x *ID) AsUUID() uuid.UUID
- func (*ID) Descriptor() ([]byte, []int)deprecated
- func (x *ID) GetData() []byte
- func (*ID) ProtoMessage()
- func (x *ID) ProtoReflect() protoreflect.Message
- func (x *ID) Reset()
- func (x *ID) Scan(v interface{}) error
- func (x *ID) String() string
- func (x *ID) Value() (driver.Value, error)
- func (x *ID) Zero() bool
- type LoadRequest
- func (*LoadRequest) Descriptor() ([]byte, []int)deprecated
- func (x *LoadRequest) GetEmail() string
- func (x *LoadRequest) GetEmailDomain() string
- func (x *LoadRequest) GetID() *ID
- func (m *LoadRequest) GetKind() isLoadRequest_Kind
- func (*LoadRequest) ProtoMessage()
- func (x *LoadRequest) ProtoReflect() protoreflect.Message
- func (x *LoadRequest) Reset()
- func (x *LoadRequest) String() string
- type LoadRequest_Email
- type LoadRequest_EmailDomain
- type LoadRequest_ID
- type Principal
- func (*Principal) Descriptor() ([]byte, []int)deprecated
- func (x *Principal) GetClaims() []byte
- func (x *Principal) GetEmailDomain() string
- func (x *Principal) GetID() *ID
- func (x *Principal) GetLabel() string
- func (x *Principal) GetRefreshAfter() *timestamppb.Timestamp
- func (x *Principal) GetRefreshStatus() TokenStatus
- func (x *Principal) GetRefreshToken() string
- func (x *Principal) GetVersion() int64
- func (*Principal) ProtoMessage()
- func (x *Principal) ProtoReflect() protoreflect.Message
- func (x *Principal) Reset()
- func (x *Principal) String() string
- type PrincipalsClient
- type PrincipalsServer
- type Principals_ListClient
- type Principals_ListServer
- type Principals_WatchClient
- type Principals_WatchServer
- type TokenStatus
- func (TokenStatus) Descriptor() protoreflect.EnumDescriptor
- func (x TokenStatus) Enum() *TokenStatus
- func (TokenStatus) EnumDescriptor() ([]byte, []int)deprecated
- func (x TokenStatus) Number() protoreflect.EnumNumber
- func (x TokenStatus) String() string
- func (TokenStatus) Type() protoreflect.EnumType
- type UnimplementedPrincipalsServer
- func (UnimplementedPrincipalsServer) Ensure(context.Context, *EnsureRequest) (*EnsureResponse, error)
- func (UnimplementedPrincipalsServer) List(*emptypb.Empty, Principals_ListServer) error
- func (UnimplementedPrincipalsServer) Load(context.Context, *LoadRequest) (*Principal, error)
- func (UnimplementedPrincipalsServer) Watch(*WatchRequest, Principals_WatchServer) error
- type UnsafePrincipalsServer
- type WatchRequest
- func (*WatchRequest) Descriptor() ([]byte, []int)deprecated
- func (x *WatchRequest) GetDuration() *durationpb.Duration
- func (x *WatchRequest) GetPrincipal() *ID
- func (*WatchRequest) ProtoMessage()
- func (x *WatchRequest) ProtoReflect() protoreflect.Message
- func (x *WatchRequest) Reset()
- func (x *WatchRequest) String() string
Constants ¶
This section is empty.
Variables ¶
var ( TokenStatus_name = map[int32]string{ 0: "UNKNOWN", 1: "VALID", 2: "REFRESHING", 3: "PERMANENT_FAILURE", } TokenStatus_value = map[string]int32{ "UNKNOWN": 0, "VALID": 1, "REFRESHING": 2, "PERMANENT_FAILURE": 3, } )
Enum value maps for TokenStatus.
var File_principal_proto protoreflect.FileDescriptor
var Unauthenticated = &ID{Data: []byte{
0xF, 0xF, 0xF, 0xF, 0xF, 0xF, 0xF, 0xF, 0xF, 0xF, 0xF, 0xF, 0xF, 0xF, 0xF, 0xF}}
Unauthenticated is a well-known ID that represents an unauthenticated user.
Functions ¶
func RegisterPrincipalsServer ¶
func RegisterPrincipalsServer(s grpc.ServiceRegistrar, srv PrincipalsServer)
Types ¶
type EnsureRequest ¶
type EnsureRequest struct { Principal *Principal `protobuf:"bytes,1,opt,name=principal,proto3" json:"principal,omitempty"` Delete bool `protobuf:"varint,2,opt,name=delete,proto3" json:"delete,omitempty"` // contains filtered or unexported fields }
func (*EnsureRequest) Descriptor
deprecated
func (*EnsureRequest) Descriptor() ([]byte, []int)
Deprecated: Use EnsureRequest.ProtoReflect.Descriptor instead.
func (*EnsureRequest) GetDelete ¶
func (x *EnsureRequest) GetDelete() bool
func (*EnsureRequest) GetPrincipal ¶
func (x *EnsureRequest) GetPrincipal() *Principal
func (*EnsureRequest) ProtoMessage ¶
func (*EnsureRequest) ProtoMessage()
func (*EnsureRequest) ProtoReflect ¶
func (x *EnsureRequest) ProtoReflect() protoreflect.Message
func (*EnsureRequest) Reset ¶
func (x *EnsureRequest) Reset()
func (*EnsureRequest) String ¶
func (x *EnsureRequest) String() string
type EnsureResponse ¶
type EnsureResponse struct { Principal *Principal `protobuf:"bytes,1,opt,name=principal,proto3" json:"principal,omitempty"` // contains filtered or unexported fields }
func (*EnsureResponse) Descriptor
deprecated
func (*EnsureResponse) Descriptor() ([]byte, []int)
Deprecated: Use EnsureResponse.ProtoReflect.Descriptor instead.
func (*EnsureResponse) GetPrincipal ¶
func (x *EnsureResponse) GetPrincipal() *Principal
func (*EnsureResponse) ProtoMessage ¶
func (*EnsureResponse) ProtoMessage()
func (*EnsureResponse) ProtoReflect ¶
func (x *EnsureResponse) ProtoReflect() protoreflect.Message
func (*EnsureResponse) Reset ¶
func (x *EnsureResponse) Reset()
func (*EnsureResponse) String ¶
func (x *EnsureResponse) String() string
type ID ¶
type ID struct { Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` // contains filtered or unexported fields }
func ParseID ¶
ParseID will parse the input as either a canonically-formatted UUID or as a base64-encoded collection of bytes.
func (*ID) Descriptor
deprecated
func (*ID) ProtoMessage ¶
func (*ID) ProtoMessage()
func (*ID) ProtoReflect ¶
func (x *ID) ProtoReflect() protoreflect.Message
type LoadRequest ¶
type LoadRequest struct { // Types that are assignable to Kind: // *LoadRequest_ID // *LoadRequest_Email // *LoadRequest_EmailDomain Kind isLoadRequest_Kind `protobuf_oneof:"Kind"` // contains filtered or unexported fields }
func (*LoadRequest) Descriptor
deprecated
func (*LoadRequest) Descriptor() ([]byte, []int)
Deprecated: Use LoadRequest.ProtoReflect.Descriptor instead.
func (*LoadRequest) GetEmail ¶
func (x *LoadRequest) GetEmail() string
func (*LoadRequest) GetEmailDomain ¶
func (x *LoadRequest) GetEmailDomain() string
func (*LoadRequest) GetID ¶
func (x *LoadRequest) GetID() *ID
func (*LoadRequest) GetKind ¶
func (m *LoadRequest) GetKind() isLoadRequest_Kind
func (*LoadRequest) ProtoMessage ¶
func (*LoadRequest) ProtoMessage()
func (*LoadRequest) ProtoReflect ¶
func (x *LoadRequest) ProtoReflect() protoreflect.Message
func (*LoadRequest) Reset ¶
func (x *LoadRequest) Reset()
func (*LoadRequest) String ¶
func (x *LoadRequest) String() string
type LoadRequest_Email ¶
type LoadRequest_Email struct { // Load a Principal by email address. Email string `protobuf:"bytes,2,opt,name=email,proto3,oneof"` }
type LoadRequest_EmailDomain ¶
type LoadRequest_EmailDomain struct { // Load a domain-level Principal. EmailDomain string `protobuf:"bytes,3,opt,name=email_domain,json=emailDomain,proto3,oneof"` }
type LoadRequest_ID ¶
type LoadRequest_ID struct { // Load a Principal based on ID. ID *ID `protobuf:"bytes,1,opt,name=ID,proto3,oneof"` }
type Principal ¶
type Principal struct { ID *ID `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"` Label string `protobuf:"bytes,2,opt,name=label,proto3" json:"label,omitempty"` Version int64 `protobuf:"varint,3,opt,name=version,proto3" json:"version,omitempty"` // OIDC claims as provided by an authentication server. Claims []byte `protobuf:"bytes,4,opt,name=claims,proto3" json:"claims,omitempty"` // If present, indicates that the principal represents all users whose // email address are in the given domain. EmailDomain string `protobuf:"bytes,5,opt,name=email_domain,json=emailDomain,proto3" json:"email_domain,omitempty"` RefreshToken string `protobuf:"bytes,66,opt,name=refresh_token,json=refreshToken,proto3" json:"refresh_token,omitempty"` RefreshAfter *timestamppb.Timestamp `protobuf:"bytes,67,opt,name=refresh_after,json=refreshAfter,proto3" json:"refresh_after,omitempty"` RefreshStatus TokenStatus `` /* 140-byte string literal not displayed */ // contains filtered or unexported fields }
func (*Principal) Descriptor
deprecated
func (*Principal) GetEmailDomain ¶
func (*Principal) GetRefreshAfter ¶
func (x *Principal) GetRefreshAfter() *timestamppb.Timestamp
func (*Principal) GetRefreshStatus ¶
func (x *Principal) GetRefreshStatus() TokenStatus
func (*Principal) GetRefreshToken ¶
func (*Principal) GetVersion ¶
func (*Principal) ProtoMessage ¶
func (*Principal) ProtoMessage()
func (*Principal) ProtoReflect ¶
func (x *Principal) ProtoReflect() protoreflect.Message
type PrincipalsClient ¶
type PrincipalsClient interface { Ensure(ctx context.Context, in *EnsureRequest, opts ...grpc.CallOption) (*EnsureResponse, error) List(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (Principals_ListClient, error) Load(ctx context.Context, in *LoadRequest, opts ...grpc.CallOption) (*Principal, error) Watch(ctx context.Context, in *WatchRequest, opts ...grpc.CallOption) (Principals_WatchClient, error) }
PrincipalsClient is the client API for Principals 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 NewPrincipalsClient ¶
func NewPrincipalsClient(cc grpc.ClientConnInterface) PrincipalsClient
type PrincipalsServer ¶
type PrincipalsServer interface { Ensure(context.Context, *EnsureRequest) (*EnsureResponse, error) List(*emptypb.Empty, Principals_ListServer) error Load(context.Context, *LoadRequest) (*Principal, error) Watch(*WatchRequest, Principals_WatchServer) error // contains filtered or unexported methods }
PrincipalsServer is the server API for Principals service. All implementations must embed UnimplementedPrincipalsServer for forward compatibility
type Principals_ListClient ¶
type Principals_ListClient interface { Recv() (*Principal, error) grpc.ClientStream }
type Principals_ListServer ¶
type Principals_ListServer interface { Send(*Principal) error grpc.ServerStream }
type Principals_WatchClient ¶
type Principals_WatchClient interface { Recv() (*Principal, error) grpc.ClientStream }
type Principals_WatchServer ¶
type Principals_WatchServer interface { Send(*Principal) error grpc.ServerStream }
type TokenStatus ¶
type TokenStatus int32
const ( // The token has not (yet) been validated. TokenStatus_UNKNOWN TokenStatus = 0 // The token should be considered valid until the refresh_after time. TokenStatus_VALID TokenStatus = 1 // The token is being refreshed by another instance. It should be // considered valid until the listed refresh time, at which point it // should be refreshed again. TokenStatus_REFRESHING TokenStatus = 2 // The token could not be revalidated and no further attempts should // be made. TokenStatus_PERMANENT_FAILURE TokenStatus = 3 )
func (TokenStatus) Descriptor ¶
func (TokenStatus) Descriptor() protoreflect.EnumDescriptor
func (TokenStatus) Enum ¶
func (x TokenStatus) Enum() *TokenStatus
func (TokenStatus) EnumDescriptor
deprecated
func (TokenStatus) EnumDescriptor() ([]byte, []int)
Deprecated: Use TokenStatus.Descriptor instead.
func (TokenStatus) Number ¶
func (x TokenStatus) Number() protoreflect.EnumNumber
func (TokenStatus) String ¶
func (x TokenStatus) String() string
func (TokenStatus) Type ¶
func (TokenStatus) Type() protoreflect.EnumType
type UnimplementedPrincipalsServer ¶
type UnimplementedPrincipalsServer struct { }
UnimplementedPrincipalsServer must be embedded to have forward compatible implementations.
func (UnimplementedPrincipalsServer) Ensure ¶
func (UnimplementedPrincipalsServer) Ensure(context.Context, *EnsureRequest) (*EnsureResponse, error)
func (UnimplementedPrincipalsServer) List ¶
func (UnimplementedPrincipalsServer) List(*emptypb.Empty, Principals_ListServer) error
func (UnimplementedPrincipalsServer) Load ¶
func (UnimplementedPrincipalsServer) Load(context.Context, *LoadRequest) (*Principal, error)
func (UnimplementedPrincipalsServer) Watch ¶
func (UnimplementedPrincipalsServer) Watch(*WatchRequest, Principals_WatchServer) error
type UnsafePrincipalsServer ¶
type UnsafePrincipalsServer interface {
// contains filtered or unexported methods
}
UnsafePrincipalsServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to PrincipalsServer will result in compilation errors.
type WatchRequest ¶
type WatchRequest struct { Principal *ID `protobuf:"bytes,1,opt,name=principal,proto3" json:"principal,omitempty"` Duration *durationpb.Duration `protobuf:"bytes,2,opt,name=duration,proto3" json:"duration,omitempty"` // contains filtered or unexported fields }
func (*WatchRequest) Descriptor
deprecated
func (*WatchRequest) Descriptor() ([]byte, []int)
Deprecated: Use WatchRequest.ProtoReflect.Descriptor instead.
func (*WatchRequest) GetDuration ¶
func (x *WatchRequest) GetDuration() *durationpb.Duration
func (*WatchRequest) GetPrincipal ¶
func (x *WatchRequest) GetPrincipal() *ID
func (*WatchRequest) ProtoMessage ¶
func (*WatchRequest) ProtoMessage()
func (*WatchRequest) ProtoReflect ¶
func (x *WatchRequest) ProtoReflect() protoreflect.Message
func (*WatchRequest) Reset ¶
func (x *WatchRequest) Reset()
func (*WatchRequest) String ¶
func (x *WatchRequest) String() string