pbacl

package
v1.13.0-alpha2 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2022 License: MPL-2.0 Imports: 9 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ACLService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "acl.ACLService",
	HandlerType: (*ACLServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Login",
			Handler:    _ACLService_Login_Handler,
		},
		{
			MethodName: "Logout",
			Handler:    _ACLService_Logout_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "proto-public/pbacl/acl.proto",
}

ACLService_ServiceDesc is the grpc.ServiceDesc for ACLService 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_public_pbacl_acl_proto protoreflect.FileDescriptor

Functions

func RegisterACLServiceServer

func RegisterACLServiceServer(s grpc.ServiceRegistrar, srv ACLServiceServer)

Types

type ACLServiceClient

type ACLServiceClient interface {
	// Login exchanges the presented bearer token for a Consul ACL token using a
	// configured auth method.
	Login(ctx context.Context, in *LoginRequest, opts ...grpc.CallOption) (*LoginResponse, error)
	// Logout destroys the given ACL token once the caller is done with it.
	Logout(ctx context.Context, in *LogoutRequest, opts ...grpc.CallOption) (*LogoutResponse, error)
}

ACLServiceClient is the client API for ACLService 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 NewACLServiceClient

func NewACLServiceClient(cc grpc.ClientConnInterface) ACLServiceClient

type ACLServiceServer

type ACLServiceServer interface {
	// Login exchanges the presented bearer token for a Consul ACL token using a
	// configured auth method.
	Login(context.Context, *LoginRequest) (*LoginResponse, error)
	// Logout destroys the given ACL token once the caller is done with it.
	Logout(context.Context, *LogoutRequest) (*LogoutResponse, error)
}

ACLServiceServer is the server API for ACLService service. All implementations should embed UnimplementedACLServiceServer for forward compatibility

type LoginRequest

type LoginRequest struct {

	// auth_method is the name of the configured auth method that will be used to
	// validate the presented bearer token.
	AuthMethod string `protobuf:"bytes,1,opt,name=auth_method,json=authMethod,proto3" json:"auth_method,omitempty"`
	// bearer_token is a token produced by a trusted identity provider as
	// configured by the auth method.
	BearerToken string `protobuf:"bytes,2,opt,name=bearer_token,json=bearerToken,proto3" json:"bearer_token,omitempty"`
	// meta is a collection of arbitrary key-value pairs associated to the token,
	// it is useful for tracking the origin of tokens.
	Meta map[string]string `` /* 149-byte string literal not displayed */
	// namespace (enterprise only) is the namespace in which the auth method
	// resides.
	Namespace string `protobuf:"bytes,4,opt,name=namespace,proto3" json:"namespace,omitempty"`
	// partition (enterprise only) is the partition in which the auth method
	// resides.
	Partition string `protobuf:"bytes,5,opt,name=partition,proto3" json:"partition,omitempty"`
	// datacenter is the target datacenter in which the request will be processed.
	Datacenter string `protobuf:"bytes,6,opt,name=datacenter,proto3" json:"datacenter,omitempty"`
	// contains filtered or unexported fields
}

func (*LoginRequest) Descriptor deprecated

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

Deprecated: Use LoginRequest.ProtoReflect.Descriptor instead.

func (*LoginRequest) GetAuthMethod

func (x *LoginRequest) GetAuthMethod() string

func (*LoginRequest) GetBearerToken

func (x *LoginRequest) GetBearerToken() string

func (*LoginRequest) GetDatacenter

func (x *LoginRequest) GetDatacenter() string

func (*LoginRequest) GetMeta

func (x *LoginRequest) GetMeta() map[string]string

func (*LoginRequest) GetNamespace

func (x *LoginRequest) GetNamespace() string

func (*LoginRequest) GetPartition

func (x *LoginRequest) GetPartition() string

func (*LoginRequest) MarshalBinary

func (msg *LoginRequest) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler

func (*LoginRequest) ProtoMessage

func (*LoginRequest) ProtoMessage()

func (*LoginRequest) ProtoReflect

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

func (*LoginRequest) Reset

func (x *LoginRequest) Reset()

func (*LoginRequest) String

func (x *LoginRequest) String() string

func (*LoginRequest) UnmarshalBinary

func (msg *LoginRequest) UnmarshalBinary(b []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler

type LoginResponse

type LoginResponse struct {

	// token is the generated ACL token.
	Token *LoginToken `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
	// contains filtered or unexported fields
}

func (*LoginResponse) Descriptor deprecated

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

Deprecated: Use LoginResponse.ProtoReflect.Descriptor instead.

func (*LoginResponse) GetToken

func (x *LoginResponse) GetToken() *LoginToken

func (*LoginResponse) MarshalBinary

func (msg *LoginResponse) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler

func (*LoginResponse) ProtoMessage

func (*LoginResponse) ProtoMessage()

func (*LoginResponse) ProtoReflect

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

func (*LoginResponse) Reset

func (x *LoginResponse) Reset()

func (*LoginResponse) String

func (x *LoginResponse) String() string

func (*LoginResponse) UnmarshalBinary

func (msg *LoginResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler

type LoginToken

type LoginToken struct {

	// accessor_id is a UUID used to identify the ACL token.
	AccessorId string `protobuf:"bytes,1,opt,name=accessor_id,json=accessorId,proto3" json:"accessor_id,omitempty"`
	// secret_id is a UUID presented as a credential by clients.
	SecretId string `protobuf:"bytes,2,opt,name=secret_id,json=secretId,proto3" json:"secret_id,omitempty"`
	// contains filtered or unexported fields
}

func (*LoginToken) Descriptor deprecated

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

Deprecated: Use LoginToken.ProtoReflect.Descriptor instead.

func (*LoginToken) GetAccessorId

func (x *LoginToken) GetAccessorId() string

func (*LoginToken) GetSecretId

func (x *LoginToken) GetSecretId() string

func (*LoginToken) MarshalBinary

func (msg *LoginToken) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler

func (*LoginToken) ProtoMessage

func (*LoginToken) ProtoMessage()

func (*LoginToken) ProtoReflect

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

func (*LoginToken) Reset

func (x *LoginToken) Reset()

func (*LoginToken) String

func (x *LoginToken) String() string

func (*LoginToken) UnmarshalBinary

func (msg *LoginToken) UnmarshalBinary(b []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler

type LogoutRequest

type LogoutRequest struct {

	// token is the ACL token's secret ID.
	Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
	// datacenter is the target datacenter in which the request will be processed.
	Datacenter string `protobuf:"bytes,2,opt,name=datacenter,proto3" json:"datacenter,omitempty"`
	// contains filtered or unexported fields
}

func (*LogoutRequest) Descriptor deprecated

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

Deprecated: Use LogoutRequest.ProtoReflect.Descriptor instead.

func (*LogoutRequest) GetDatacenter

func (x *LogoutRequest) GetDatacenter() string

func (*LogoutRequest) GetToken

func (x *LogoutRequest) GetToken() string

func (*LogoutRequest) MarshalBinary

func (msg *LogoutRequest) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler

func (*LogoutRequest) ProtoMessage

func (*LogoutRequest) ProtoMessage()

func (*LogoutRequest) ProtoReflect

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

func (*LogoutRequest) Reset

func (x *LogoutRequest) Reset()

func (*LogoutRequest) String

func (x *LogoutRequest) String() string

func (*LogoutRequest) UnmarshalBinary

func (msg *LogoutRequest) UnmarshalBinary(b []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler

type LogoutResponse

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

func (*LogoutResponse) Descriptor deprecated

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

Deprecated: Use LogoutResponse.ProtoReflect.Descriptor instead.

func (*LogoutResponse) MarshalBinary

func (msg *LogoutResponse) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler

func (*LogoutResponse) ProtoMessage

func (*LogoutResponse) ProtoMessage()

func (*LogoutResponse) ProtoReflect

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

func (*LogoutResponse) Reset

func (x *LogoutResponse) Reset()

func (*LogoutResponse) String

func (x *LogoutResponse) String() string

func (*LogoutResponse) UnmarshalBinary

func (msg *LogoutResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler

type UnimplementedACLServiceServer

type UnimplementedACLServiceServer struct {
}

UnimplementedACLServiceServer should be embedded to have forward compatible implementations.

func (UnimplementedACLServiceServer) Login

func (UnimplementedACLServiceServer) Logout

type UnsafeACLServiceServer

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

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

Jump to

Keyboard shortcuts

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