Documentation
¶
Index ¶
- Constants
- Variables
- func RegisterAuthorizationV0Server(s grpc.ServiceRegistrar, srv AuthorizationV0Server)
- type Action
- type AuthorizationV0Client
- type AuthorizationV0Server
- type CanRequest
- func (*CanRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CanRequest) GetAction() Action
- func (x *CanRequest) GetApi() string
- func (x *CanRequest) GetName() string
- func (x *CanRequest) GetUser() string
- func (x *CanRequest) GetVersion() string
- func (*CanRequest) ProtoMessage()
- func (x *CanRequest) ProtoReflect() protoreflect.Message
- func (x *CanRequest) Reset()
- func (x *CanRequest) String() string
- type CanResponse
- func (*CanResponse) Descriptor() ([]byte, []int)deprecated
- func (x *CanResponse) GetAllowed() bool
- func (x *CanResponse) GetMessage() string
- func (*CanResponse) ProtoMessage()
- func (x *CanResponse) ProtoReflect() protoreflect.Message
- func (x *CanResponse) Reset()
- func (x *CanResponse) String() string
- type UnimplementedAuthorizationV0Server
- type UnsafeAuthorizationV0Server
Constants ¶
const (
Name = "authorization.v0"
)
Variables ¶
var ( Action_name = map[int32]string{ 0: "ACTION_ANY_UNSPECIFIED", 1: "ACTION_LIST", 2: "ACTION_GET", 3: "ACTION_CREATE", 4: "ACTION_DELETE", } Action_value = map[string]int32{ "ACTION_ANY_UNSPECIFIED": 0, "ACTION_LIST": 1, "ACTION_GET": 2, "ACTION_CREATE": 3, "ACTION_DELETE": 4, } )
Enum value maps for Action.
var AuthorizationV0_ServiceDesc = grpc.ServiceDesc{ ServiceName: "authorization.AuthorizationV0", HandlerType: (*AuthorizationV0Server)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Can", Handler: _AuthorizationV0_Can_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "integrations/authorization/v0/definition/definition.proto", }
AuthorizationV0_ServiceDesc is the grpc.ServiceDesc for AuthorizationV0 service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterAuthorizationV0Server ¶
func RegisterAuthorizationV0Server(s grpc.ServiceRegistrar, srv AuthorizationV0Server)
Types ¶
type Action ¶
type Action int32
Action define action used for Authorization
const ( // ACTION_ANY_UNSPECIFIED is used when there is no Action defined for call Action_ACTION_ANY_UNSPECIFIED Action = 0 // ACTION_LIST define Action List Action_ACTION_LIST Action = 1 // ACTION_GET define Action Get Action_ACTION_GET Action = 2 // ACTION_CREATE define Action Create Action_ACTION_CREATE Action = 3 // ACTION_DELETE define Action Delete Action_ACTION_DELETE Action = 4 )
func (Action) Descriptor ¶
func (Action) Descriptor() protoreflect.EnumDescriptor
func (Action) EnumDescriptor
deprecated
func (Action) Number ¶
func (x Action) Number() protoreflect.EnumNumber
func (Action) Type ¶
func (Action) Type() protoreflect.EnumType
type AuthorizationV0Client ¶
type AuthorizationV0Client interface { // Can validate if specified request is allowed Can(ctx context.Context, in *CanRequest, opts ...grpc.CallOption) (*CanResponse, error) }
AuthorizationV0Client is the client API for AuthorizationV0 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 NewAuthorizationV0Client ¶
func NewAuthorizationV0Client(cc grpc.ClientConnInterface) AuthorizationV0Client
type AuthorizationV0Server ¶
type AuthorizationV0Server interface { // Can validate if specified request is allowed Can(context.Context, *CanRequest) (*CanResponse, error) // contains filtered or unexported methods }
AuthorizationV0Server is the server API for AuthorizationV0 service. All implementations must embed UnimplementedAuthorizationV0Server for forward compatibility
type CanRequest ¶
type CanRequest struct { // user define the Requester User User string `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` // action define the Action type Action Action `protobuf:"varint,2,opt,name=action,proto3,enum=authorization.Action" json:"action,omitempty"` // api Keeps the information about API, For example training, prediction Api string `protobuf:"bytes,3,opt,name=api,proto3" json:"api,omitempty"` // version keeps the information about used API Version, optional Version *string `protobuf:"bytes,4,opt,name=version,proto3,oneof" json:"version,omitempty"` // name keeps the information about Resource name, used in Get/Create/Delete requests Name *string `protobuf:"bytes,5,opt,name=name,proto3,oneof" json:"name,omitempty"` // contains filtered or unexported fields }
CanRequest define Can method Request Body
func (*CanRequest) Descriptor
deprecated
func (*CanRequest) Descriptor() ([]byte, []int)
Deprecated: Use CanRequest.ProtoReflect.Descriptor instead.
func (*CanRequest) GetAction ¶
func (x *CanRequest) GetAction() Action
func (*CanRequest) GetApi ¶
func (x *CanRequest) GetApi() string
func (*CanRequest) GetName ¶
func (x *CanRequest) GetName() string
func (*CanRequest) GetUser ¶
func (x *CanRequest) GetUser() string
func (*CanRequest) GetVersion ¶
func (x *CanRequest) GetVersion() string
func (*CanRequest) ProtoMessage ¶
func (*CanRequest) ProtoMessage()
func (*CanRequest) ProtoReflect ¶
func (x *CanRequest) ProtoReflect() protoreflect.Message
func (*CanRequest) Reset ¶
func (x *CanRequest) Reset()
func (*CanRequest) String ¶
func (x *CanRequest) String() string
type CanResponse ¶
type CanResponse struct { // allowed keeps the information if request is allowed Allowed bool `protobuf:"varint,1,opt,name=allowed,proto3" json:"allowed,omitempty"` // message keeps the information about allow/deny Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
CanResponse define Can method Response Body
func (*CanResponse) Descriptor
deprecated
func (*CanResponse) Descriptor() ([]byte, []int)
Deprecated: Use CanResponse.ProtoReflect.Descriptor instead.
func (*CanResponse) GetAllowed ¶
func (x *CanResponse) GetAllowed() bool
func (*CanResponse) GetMessage ¶
func (x *CanResponse) GetMessage() string
func (*CanResponse) ProtoMessage ¶
func (*CanResponse) ProtoMessage()
func (*CanResponse) ProtoReflect ¶
func (x *CanResponse) ProtoReflect() protoreflect.Message
func (*CanResponse) Reset ¶
func (x *CanResponse) Reset()
func (*CanResponse) String ¶
func (x *CanResponse) String() string
type UnimplementedAuthorizationV0Server ¶
type UnimplementedAuthorizationV0Server struct { }
UnimplementedAuthorizationV0Server must be embedded to have forward compatible implementations.
func (UnimplementedAuthorizationV0Server) Can ¶
func (UnimplementedAuthorizationV0Server) Can(context.Context, *CanRequest) (*CanResponse, error)
type UnsafeAuthorizationV0Server ¶
type UnsafeAuthorizationV0Server interface {
// contains filtered or unexported methods
}
UnsafeAuthorizationV0Server may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to AuthorizationV0Server will result in compilation errors.