proto

package
v0.6.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 20, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Access_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "katallaxie.protobuf.Access",
	HandlerType: (*AccessServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Check",
			Handler:    _Access_Check_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "proto/access.proto",
}

Access_ServiceDesc is the grpc.ServiceDesc for Access service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

View Source
var File_proto_access_proto protoreflect.FileDescriptor
View Source
var File_proto_snowflake_proto protoreflect.FileDescriptor
View Source
var File_proto_urn_proto protoreflect.FileDescriptor

Functions

func RegisterAccessServer

func RegisterAccessServer(s grpc.ServiceRegistrar, srv AccessServer)

Types

type AccessClient

type AccessClient interface {
	// Check is checking if the given access is allowed for the given `actor`.
	Check(ctx context.Context, in *Check_Request, opts ...grpc.CallOption) (*Check_Response, error)
}

AccessClient is the client API for Access 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 NewAccessClient

func NewAccessClient(cc grpc.ClientConnInterface) AccessClient

type AccessServer

type AccessServer interface {
	// Check is checking if the given access is allowed for the given `actor`.
	Check(context.Context, *Check_Request) (*Check_Response, error)
	// contains filtered or unexported methods
}

AccessServer is the server API for Access service. All implementations must embed UnimplementedAccessServer for forward compatibility

type Check

type Check struct {
	// contains filtered or unexported fields
}

func (*Check) Descriptor deprecated

func (*Check) Descriptor() ([]byte, []int)

Deprecated: Use Check.ProtoReflect.Descriptor instead.

func (*Check) ProtoMessage

func (*Check) ProtoMessage()

func (*Check) ProtoReflect

func (x *Check) ProtoReflect() protoreflect.Message

func (*Check) Reset

func (x *Check) Reset()

func (*Check) String

func (x *Check) String() string

type Check_Request

type Check_Request struct {

	// The possible principal of the action.
	Principal *ResourceURN `protobuf:"bytes,1,opt,name=principal,proto3" json:"principal,omitempty"`
	// The action is the action that is requested.
	Action string `protobuf:"bytes,2,opt,name=action,proto3" json:"action,omitempty"`
	// The resource is the resource that is requested.
	Resource *ResourceURN `protobuf:"bytes,3,opt,name=resource,proto3" json:"resource,omitempty"`
	// The context is the context that is requested.
	Context map[string]string `` /* 156-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*Check_Request) Descriptor deprecated

func (*Check_Request) Descriptor() ([]byte, []int)

Deprecated: Use Check_Request.ProtoReflect.Descriptor instead.

func (*Check_Request) GetAction

func (x *Check_Request) GetAction() string

func (*Check_Request) GetContext

func (x *Check_Request) GetContext() map[string]string

func (*Check_Request) GetPrincipal

func (x *Check_Request) GetPrincipal() *ResourceURN

func (*Check_Request) GetResource

func (x *Check_Request) GetResource() *ResourceURN

func (*Check_Request) ProtoMessage

func (*Check_Request) ProtoMessage()

func (*Check_Request) ProtoReflect

func (x *Check_Request) ProtoReflect() protoreflect.Message

func (*Check_Request) Reset

func (x *Check_Request) Reset()

func (*Check_Request) String

func (x *Check_Request) String() string

type Check_Response

type Check_Response struct {

	// The allowed is true if the access is allowed, false otherwise.
	Allowed bool `protobuf:"varint,1,opt,name=allowed,proto3" json:"allowed,omitempty"`
	// Metadata contains additional information concerning the authentication.
	Metadata map[string]string `` /* 157-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*Check_Response) Descriptor deprecated

func (*Check_Response) Descriptor() ([]byte, []int)

Deprecated: Use Check_Response.ProtoReflect.Descriptor instead.

func (*Check_Response) GetAllowed

func (x *Check_Response) GetAllowed() bool

func (*Check_Response) GetMetadata

func (x *Check_Response) GetMetadata() map[string]string

func (*Check_Response) ProtoMessage

func (*Check_Response) ProtoMessage()

func (*Check_Response) ProtoReflect

func (x *Check_Response) ProtoReflect() protoreflect.Message

func (*Check_Response) Reset

func (x *Check_Response) Reset()

func (*Check_Response) String

func (x *Check_Response) String() string

type ResourceURN

type ResourceURN struct {

	// canonical means the full representation of the URN
	Canonical string `protobuf:"bytes,1,opt,name=canonical,proto3" json:"canonical,omitempty"`
	// namespace is the namespace name, which reflects a collection
	Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"`
	// partition is the partition name, which reflects a collection
	Partition string `protobuf:"bytes,3,opt,name=partition,proto3" json:"partition,omitempty"`
	// service is the service name, which reflects a collection
	Service string `protobuf:"bytes,4,opt,name=service,proto3" json:"service,omitempty"`
	// region is the service region, which reflects a collection
	Region string `protobuf:"bytes,5,opt,name=region,proto3" json:"region,omitempty"`
	// identifier is the identifier of the resource within a collection
	Identifier string `protobuf:"bytes,6,opt,name=identifier,proto3" json:"identifier,omitempty"`
	// resource can be an associated resource of the URN
	Resource string `protobuf:"bytes,7,opt,name=resource,proto3" json:"resource,omitempty"`
	// contains filtered or unexported fields
}

A ResourceURN represents a unique identifier of a resource in a service.

func (*ResourceURN) Descriptor deprecated

func (*ResourceURN) Descriptor() ([]byte, []int)

Deprecated: Use ResourceURN.ProtoReflect.Descriptor instead.

func (*ResourceURN) GetCanonical

func (x *ResourceURN) GetCanonical() string

func (*ResourceURN) GetIdentifier

func (x *ResourceURN) GetIdentifier() string

func (*ResourceURN) GetNamespace

func (x *ResourceURN) GetNamespace() string

func (*ResourceURN) GetPartition

func (x *ResourceURN) GetPartition() string

func (*ResourceURN) GetRegion

func (x *ResourceURN) GetRegion() string

func (*ResourceURN) GetResource

func (x *ResourceURN) GetResource() string

func (*ResourceURN) GetService

func (x *ResourceURN) GetService() string

func (*ResourceURN) ProtoMessage

func (*ResourceURN) ProtoMessage()

func (*ResourceURN) ProtoReflect

func (x *ResourceURN) ProtoReflect() protoreflect.Message

func (*ResourceURN) Reset

func (x *ResourceURN) Reset()

func (*ResourceURN) String

func (x *ResourceURN) String() string

type Snowflake

type Snowflake struct {
	Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

Snowflake is a unique identifier for a message.

func (*Snowflake) Descriptor deprecated

func (*Snowflake) Descriptor() ([]byte, []int)

Deprecated: Use Snowflake.ProtoReflect.Descriptor instead.

func (*Snowflake) GetId

func (x *Snowflake) GetId() int64

func (*Snowflake) ProtoMessage

func (*Snowflake) ProtoMessage()

func (*Snowflake) ProtoReflect

func (x *Snowflake) ProtoReflect() protoreflect.Message

func (*Snowflake) Reset

func (x *Snowflake) Reset()

func (*Snowflake) String

func (x *Snowflake) String() string

type UnimplementedAccessServer

type UnimplementedAccessServer struct {
}

UnimplementedAccessServer must be embedded to have forward compatible implementations.

func (UnimplementedAccessServer) Check

type UnsafeAccessServer

type UnsafeAccessServer interface {
	// contains filtered or unexported methods
}

UnsafeAccessServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to AccessServer will result in compilation errors.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL