Documentation
¶
Index ¶
- Constants
- Variables
- func RegisterAuthenticationServer(s grpc.ServiceRegistrar, srv AuthenticationServer)
- func RegisterAuthorizerServer(s grpc.ServiceRegistrar, srv AuthorizerServer)
- type AuthenticateRequest
- func (*AuthenticateRequest) Descriptor() ([]byte, []int)deprecated
- func (x *AuthenticateRequest) GetRequestMetadata() map[string]*AuthenticateRequest_ValueList
- func (x *AuthenticateRequest) GetScope() *structpb.Value
- func (*AuthenticateRequest) ProtoMessage()
- func (x *AuthenticateRequest) ProtoReflect() protoreflect.Message
- func (x *AuthenticateRequest) Reset()
- func (x *AuthenticateRequest) String() string
- type AuthenticateRequest_ValueList
- func (*AuthenticateRequest_ValueList) Descriptor() ([]byte, []int)deprecated
- func (x *AuthenticateRequest_ValueList) GetValue() []string
- func (*AuthenticateRequest_ValueList) ProtoMessage()
- func (x *AuthenticateRequest_ValueList) ProtoReflect() protoreflect.Message
- func (x *AuthenticateRequest_ValueList) Reset()
- func (x *AuthenticateRequest_ValueList) String() string
- type AuthenticateResponse
- func (*AuthenticateResponse) Descriptor() ([]byte, []int)deprecated
- func (x *AuthenticateResponse) GetAllow() *AuthenticationMetadata
- func (x *AuthenticateResponse) GetCacheExpirationTime() *timestamppb.Timestamp
- func (x *AuthenticateResponse) GetDeny() string
- func (x *AuthenticateResponse) GetVerdict() isAuthenticateResponse_Verdict
- func (*AuthenticateResponse) ProtoMessage()
- func (x *AuthenticateResponse) ProtoReflect() protoreflect.Message
- func (x *AuthenticateResponse) Reset()
- func (x *AuthenticateResponse) String() string
- type AuthenticateResponse_Allow
- type AuthenticateResponse_Deny
- type AuthenticationClient
- type AuthenticationMetadata
- func (*AuthenticationMetadata) Descriptor() ([]byte, []int)deprecated
- func (x *AuthenticationMetadata) GetPrivate() *structpb.Value
- func (x *AuthenticationMetadata) GetPublic() *structpb.Value
- func (x *AuthenticationMetadata) GetTracingAttributes() []*v1.KeyValue
- func (*AuthenticationMetadata) ProtoMessage()
- func (x *AuthenticationMetadata) ProtoReflect() protoreflect.Message
- func (x *AuthenticationMetadata) Reset()
- func (x *AuthenticationMetadata) String() string
- type AuthenticationServer
- type AuthorizeRequest
- func (*AuthorizeRequest) Descriptor() ([]byte, []int)deprecated
- func (x *AuthorizeRequest) GetAuthenticationMetadata() *AuthenticationMetadata
- func (x *AuthorizeRequest) GetInstanceName() string
- func (x *AuthorizeRequest) GetScope() *structpb.Value
- func (*AuthorizeRequest) ProtoMessage()
- func (x *AuthorizeRequest) ProtoReflect() protoreflect.Message
- func (x *AuthorizeRequest) Reset()
- func (x *AuthorizeRequest) String() string
- type AuthorizeResponse
- func (*AuthorizeResponse) Descriptor() ([]byte, []int)deprecated
- func (x *AuthorizeResponse) GetAllow() *emptypb.Empty
- func (x *AuthorizeResponse) GetCacheExpirationTime() *timestamppb.Timestamp
- func (x *AuthorizeResponse) GetDeny() string
- func (x *AuthorizeResponse) GetVerdict() isAuthorizeResponse_Verdict
- func (*AuthorizeResponse) ProtoMessage()
- func (x *AuthorizeResponse) ProtoReflect() protoreflect.Message
- func (x *AuthorizeResponse) Reset()
- func (x *AuthorizeResponse) String() string
- type AuthorizeResponse_Allow
- type AuthorizeResponse_Deny
- type AuthorizerClient
- type AuthorizerServer
- type UnimplementedAuthenticationServer
- type UnimplementedAuthorizerServer
- type UnsafeAuthenticationServer
- type UnsafeAuthorizerServer
Constants ¶
const (
Authentication_Authenticate_FullMethodName = "/buildbarn.auth.Authentication/Authenticate"
)
const (
Authorizer_Authorize_FullMethodName = "/buildbarn.auth.Authorizer/Authorize"
)
Variables ¶
var Authentication_ServiceDesc = grpc.ServiceDesc{ ServiceName: "buildbarn.auth.Authentication", HandlerType: (*AuthenticationServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Authenticate", Handler: _Authentication_Authenticate_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "github.com/buildbarn/bb-storage/pkg/proto/auth/auth.proto", }
Authentication_ServiceDesc is the grpc.ServiceDesc for Authentication service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var Authorizer_ServiceDesc = grpc.ServiceDesc{ ServiceName: "buildbarn.auth.Authorizer", HandlerType: (*AuthorizerServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Authorize", Handler: _Authorizer_Authorize_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "github.com/buildbarn/bb-storage/pkg/proto/auth/auth.proto", }
Authorizer_ServiceDesc is the grpc.ServiceDesc for Authorizer service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_github_com_buildbarn_bb_storage_pkg_proto_auth_auth_proto protoreflect.FileDescriptor
Functions ¶
func RegisterAuthenticationServer ¶
func RegisterAuthenticationServer(s grpc.ServiceRegistrar, srv AuthenticationServer)
func RegisterAuthorizerServer ¶
func RegisterAuthorizerServer(s grpc.ServiceRegistrar, srv AuthorizerServer)
Types ¶
type AuthenticateRequest ¶
type AuthenticateRequest struct { RequestMetadata map[string]*AuthenticateRequest_ValueList `` /* 180-byte string literal not displayed */ Scope *structpb.Value `protobuf:"bytes,2,opt,name=scope,proto3" json:"scope,omitempty"` // contains filtered or unexported fields }
func (*AuthenticateRequest) Descriptor
deprecated
func (*AuthenticateRequest) Descriptor() ([]byte, []int)
Deprecated: Use AuthenticateRequest.ProtoReflect.Descriptor instead.
func (*AuthenticateRequest) GetRequestMetadata ¶
func (x *AuthenticateRequest) GetRequestMetadata() map[string]*AuthenticateRequest_ValueList
func (*AuthenticateRequest) GetScope ¶
func (x *AuthenticateRequest) GetScope() *structpb.Value
func (*AuthenticateRequest) ProtoMessage ¶
func (*AuthenticateRequest) ProtoMessage()
func (*AuthenticateRequest) ProtoReflect ¶
func (x *AuthenticateRequest) ProtoReflect() protoreflect.Message
func (*AuthenticateRequest) Reset ¶
func (x *AuthenticateRequest) Reset()
func (*AuthenticateRequest) String ¶
func (x *AuthenticateRequest) String() string
type AuthenticateRequest_ValueList ¶
type AuthenticateRequest_ValueList struct { Value []string `protobuf:"bytes,1,rep,name=value,proto3" json:"value,omitempty"` // contains filtered or unexported fields }
func (*AuthenticateRequest_ValueList) Descriptor
deprecated
func (*AuthenticateRequest_ValueList) Descriptor() ([]byte, []int)
Deprecated: Use AuthenticateRequest_ValueList.ProtoReflect.Descriptor instead.
func (*AuthenticateRequest_ValueList) GetValue ¶
func (x *AuthenticateRequest_ValueList) GetValue() []string
func (*AuthenticateRequest_ValueList) ProtoMessage ¶
func (*AuthenticateRequest_ValueList) ProtoMessage()
func (*AuthenticateRequest_ValueList) ProtoReflect ¶
func (x *AuthenticateRequest_ValueList) ProtoReflect() protoreflect.Message
func (*AuthenticateRequest_ValueList) Reset ¶
func (x *AuthenticateRequest_ValueList) Reset()
func (*AuthenticateRequest_ValueList) String ¶
func (x *AuthenticateRequest_ValueList) String() string
type AuthenticateResponse ¶
type AuthenticateResponse struct { // Types that are valid to be assigned to Verdict: // // *AuthenticateResponse_Allow // *AuthenticateResponse_Deny Verdict isAuthenticateResponse_Verdict `protobuf_oneof:"verdict"` CacheExpirationTime *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=cache_expiration_time,json=cacheExpirationTime,proto3" json:"cache_expiration_time,omitempty"` // contains filtered or unexported fields }
func (*AuthenticateResponse) Descriptor
deprecated
func (*AuthenticateResponse) Descriptor() ([]byte, []int)
Deprecated: Use AuthenticateResponse.ProtoReflect.Descriptor instead.
func (*AuthenticateResponse) GetAllow ¶
func (x *AuthenticateResponse) GetAllow() *AuthenticationMetadata
func (*AuthenticateResponse) GetCacheExpirationTime ¶
func (x *AuthenticateResponse) GetCacheExpirationTime() *timestamppb.Timestamp
func (*AuthenticateResponse) GetDeny ¶
func (x *AuthenticateResponse) GetDeny() string
func (*AuthenticateResponse) GetVerdict ¶
func (x *AuthenticateResponse) GetVerdict() isAuthenticateResponse_Verdict
func (*AuthenticateResponse) ProtoMessage ¶
func (*AuthenticateResponse) ProtoMessage()
func (*AuthenticateResponse) ProtoReflect ¶
func (x *AuthenticateResponse) ProtoReflect() protoreflect.Message
func (*AuthenticateResponse) Reset ¶
func (x *AuthenticateResponse) Reset()
func (*AuthenticateResponse) String ¶
func (x *AuthenticateResponse) String() string
type AuthenticateResponse_Allow ¶
type AuthenticateResponse_Allow struct {
Allow *AuthenticationMetadata `protobuf:"bytes,1,opt,name=allow,proto3,oneof"`
}
type AuthenticateResponse_Deny ¶
type AuthenticateResponse_Deny struct {
Deny string `protobuf:"bytes,2,opt,name=deny,proto3,oneof"`
}
type AuthenticationClient ¶
type AuthenticationClient interface {
Authenticate(ctx context.Context, in *AuthenticateRequest, opts ...grpc.CallOption) (*AuthenticateResponse, error)
}
AuthenticationClient is the client API for Authentication 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 NewAuthenticationClient ¶
func NewAuthenticationClient(cc grpc.ClientConnInterface) AuthenticationClient
type AuthenticationMetadata ¶
type AuthenticationMetadata struct { Public *structpb.Value `protobuf:"bytes,1,opt,name=public,proto3" json:"public,omitempty"` TracingAttributes []*v1.KeyValue `protobuf:"bytes,2,rep,name=tracing_attributes,json=tracingAttributes,proto3" json:"tracing_attributes,omitempty"` Private *structpb.Value `protobuf:"bytes,3,opt,name=private,proto3" json:"private,omitempty"` // contains filtered or unexported fields }
func (*AuthenticationMetadata) Descriptor
deprecated
func (*AuthenticationMetadata) Descriptor() ([]byte, []int)
Deprecated: Use AuthenticationMetadata.ProtoReflect.Descriptor instead.
func (*AuthenticationMetadata) GetPrivate ¶
func (x *AuthenticationMetadata) GetPrivate() *structpb.Value
func (*AuthenticationMetadata) GetPublic ¶
func (x *AuthenticationMetadata) GetPublic() *structpb.Value
func (*AuthenticationMetadata) GetTracingAttributes ¶
func (x *AuthenticationMetadata) GetTracingAttributes() []*v1.KeyValue
func (*AuthenticationMetadata) ProtoMessage ¶
func (*AuthenticationMetadata) ProtoMessage()
func (*AuthenticationMetadata) ProtoReflect ¶
func (x *AuthenticationMetadata) ProtoReflect() protoreflect.Message
func (*AuthenticationMetadata) Reset ¶
func (x *AuthenticationMetadata) Reset()
func (*AuthenticationMetadata) String ¶
func (x *AuthenticationMetadata) String() string
type AuthenticationServer ¶
type AuthenticationServer interface {
Authenticate(context.Context, *AuthenticateRequest) (*AuthenticateResponse, error)
}
AuthenticationServer is the server API for Authentication service. All implementations should embed UnimplementedAuthenticationServer for forward compatibility.
type AuthorizeRequest ¶
type AuthorizeRequest struct { AuthenticationMetadata *AuthenticationMetadata `` /* 127-byte string literal not displayed */ Scope *structpb.Value `protobuf:"bytes,2,opt,name=scope,proto3" json:"scope,omitempty"` InstanceName string `protobuf:"bytes,3,opt,name=instance_name,json=instanceName,proto3" json:"instance_name,omitempty"` // contains filtered or unexported fields }
func (*AuthorizeRequest) Descriptor
deprecated
func (*AuthorizeRequest) Descriptor() ([]byte, []int)
Deprecated: Use AuthorizeRequest.ProtoReflect.Descriptor instead.
func (*AuthorizeRequest) GetAuthenticationMetadata ¶
func (x *AuthorizeRequest) GetAuthenticationMetadata() *AuthenticationMetadata
func (*AuthorizeRequest) GetInstanceName ¶
func (x *AuthorizeRequest) GetInstanceName() string
func (*AuthorizeRequest) GetScope ¶
func (x *AuthorizeRequest) GetScope() *structpb.Value
func (*AuthorizeRequest) ProtoMessage ¶
func (*AuthorizeRequest) ProtoMessage()
func (*AuthorizeRequest) ProtoReflect ¶
func (x *AuthorizeRequest) ProtoReflect() protoreflect.Message
func (*AuthorizeRequest) Reset ¶
func (x *AuthorizeRequest) Reset()
func (*AuthorizeRequest) String ¶
func (x *AuthorizeRequest) String() string
type AuthorizeResponse ¶
type AuthorizeResponse struct { // Types that are valid to be assigned to Verdict: // // *AuthorizeResponse_Allow // *AuthorizeResponse_Deny Verdict isAuthorizeResponse_Verdict `protobuf_oneof:"verdict"` CacheExpirationTime *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=cache_expiration_time,json=cacheExpirationTime,proto3" json:"cache_expiration_time,omitempty"` // contains filtered or unexported fields }
func (*AuthorizeResponse) Descriptor
deprecated
func (*AuthorizeResponse) Descriptor() ([]byte, []int)
Deprecated: Use AuthorizeResponse.ProtoReflect.Descriptor instead.
func (*AuthorizeResponse) GetAllow ¶
func (x *AuthorizeResponse) GetAllow() *emptypb.Empty
func (*AuthorizeResponse) GetCacheExpirationTime ¶
func (x *AuthorizeResponse) GetCacheExpirationTime() *timestamppb.Timestamp
func (*AuthorizeResponse) GetDeny ¶
func (x *AuthorizeResponse) GetDeny() string
func (*AuthorizeResponse) GetVerdict ¶
func (x *AuthorizeResponse) GetVerdict() isAuthorizeResponse_Verdict
func (*AuthorizeResponse) ProtoMessage ¶
func (*AuthorizeResponse) ProtoMessage()
func (*AuthorizeResponse) ProtoReflect ¶
func (x *AuthorizeResponse) ProtoReflect() protoreflect.Message
func (*AuthorizeResponse) Reset ¶
func (x *AuthorizeResponse) Reset()
func (*AuthorizeResponse) String ¶
func (x *AuthorizeResponse) String() string
type AuthorizeResponse_Allow ¶
type AuthorizeResponse_Deny ¶
type AuthorizeResponse_Deny struct {
Deny string `protobuf:"bytes,2,opt,name=deny,proto3,oneof"`
}
type AuthorizerClient ¶
type AuthorizerClient interface {
Authorize(ctx context.Context, in *AuthorizeRequest, opts ...grpc.CallOption) (*AuthorizeResponse, error)
}
AuthorizerClient is the client API for Authorizer 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 NewAuthorizerClient ¶
func NewAuthorizerClient(cc grpc.ClientConnInterface) AuthorizerClient
type AuthorizerServer ¶
type AuthorizerServer interface {
Authorize(context.Context, *AuthorizeRequest) (*AuthorizeResponse, error)
}
AuthorizerServer is the server API for Authorizer service. All implementations should embed UnimplementedAuthorizerServer for forward compatibility.
type UnimplementedAuthenticationServer ¶
type UnimplementedAuthenticationServer struct{}
UnimplementedAuthenticationServer should 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 (UnimplementedAuthenticationServer) Authenticate ¶
func (UnimplementedAuthenticationServer) Authenticate(context.Context, *AuthenticateRequest) (*AuthenticateResponse, error)
type UnimplementedAuthorizerServer ¶
type UnimplementedAuthorizerServer struct{}
UnimplementedAuthorizerServer should 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 (UnimplementedAuthorizerServer) Authorize ¶
func (UnimplementedAuthorizerServer) Authorize(context.Context, *AuthorizeRequest) (*AuthorizeResponse, error)
type UnsafeAuthenticationServer ¶
type UnsafeAuthenticationServer interface {
// contains filtered or unexported methods
}
UnsafeAuthenticationServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to AuthenticationServer will result in compilation errors.
type UnsafeAuthorizerServer ¶
type UnsafeAuthorizerServer interface {
// contains filtered or unexported methods
}
UnsafeAuthorizerServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to AuthorizerServer will result in compilation errors.