secret

package
v2.0.2 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2022 License: MIT Imports: 6 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Type_name = map[int32]string{
		0: "CLIENT",
		1: "SERVER",
	}
	Type_value = map[string]int32{
		"CLIENT": 0,
		"SERVER": 1,
	}
)

Enum value maps for Type.

View Source
var (
	Algorithm_name = map[int32]string{
		0: "None",
		1: "HMAC",
		2: "RSA",
		3: "PSS",
		4: "ECDSA",
		5: "EdDSA",
	}
	Algorithm_value = map[string]int32{
		"None":  0,
		"HMAC":  1,
		"RSA":   2,
		"PSS":   3,
		"ECDSA": 4,
		"EdDSA": 5,
	}
)

Enum value maps for Algorithm.

View Source
var File_credential_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type Algorithm

type Algorithm int32

Token algorithm

const (
	Algorithm_None  Algorithm = 0 // None
	Algorithm_HMAC  Algorithm = 1 // HMAC
	Algorithm_RSA   Algorithm = 2 // RSA-PKCS
	Algorithm_PSS   Algorithm = 3 // RSA-PSS
	Algorithm_ECDSA Algorithm = 4 // ECDSA
	Algorithm_EdDSA Algorithm = 5 // EdDSA
)

func (Algorithm) Descriptor

func (Algorithm) Descriptor() protoreflect.EnumDescriptor

func (Algorithm) Enum

func (x Algorithm) Enum() *Algorithm

func (Algorithm) EnumDescriptor deprecated

func (Algorithm) EnumDescriptor() ([]byte, []int)

Deprecated: Use Algorithm.Descriptor instead.

func (Algorithm) Number

func (x Algorithm) Number() protoreflect.EnumNumber

func (Algorithm) String

func (x Algorithm) String() string

func (Algorithm) Type

type Info

type Info struct {
	Type      Type                   `protobuf:"varint,1,opt,name=type,proto3,enum=appootb.secret.Type" json:"type,omitempty"`                      // Secret type
	Algorithm Algorithm              `protobuf:"varint,2,opt,name=algorithm,proto3,enum=appootb.secret.Algorithm" json:"algorithm,omitempty"`       // Secret algorithm
	Issuer    string                 `protobuf:"bytes,3,opt,name=issuer,proto3" json:"issuer,omitempty"`                                            // Token issuer
	Account   uint64                 `protobuf:"varint,4,opt,name=account,proto3" json:"account,omitempty"`                                         // Account ID
	KeyId     int64                  `protobuf:"varint,5,opt,name=key_id,json=keyId,proto3" json:"key_id,omitempty"`                                // Key ID
	Roles     []string               `protobuf:"bytes,6,rep,name=roles,proto3" json:"roles,omitempty"`                                              // Account roles
	Subject   permission.Subject     `protobuf:"varint,11,opt,name=subject,proto3,enum=appootb.permission.method.Subject" json:"subject,omitempty"` // Token subject
	IssuedAt  *timestamppb.Timestamp `protobuf:"bytes,21,opt,name=issued_at,json=issuedAt,proto3" json:"issued_at,omitempty"`                       // Issued timestamp
	ExpiredAt *timestamppb.Timestamp `protobuf:"bytes,22,opt,name=expired_at,json=expiredAt,proto3" json:"expired_at,omitempty"`                    // Expired timestamp
	// contains filtered or unexported fields
}

Token secret info.

func (*Info) Descriptor deprecated

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

Deprecated: Use Info.ProtoReflect.Descriptor instead.

func (*Info) GetAccount

func (x *Info) GetAccount() uint64

func (*Info) GetAlgorithm

func (x *Info) GetAlgorithm() Algorithm

func (*Info) GetExpiredAt

func (x *Info) GetExpiredAt() *timestamppb.Timestamp

func (*Info) GetIssuedAt

func (x *Info) GetIssuedAt() *timestamppb.Timestamp

func (*Info) GetIssuer

func (x *Info) GetIssuer() string

func (*Info) GetKeyId

func (x *Info) GetKeyId() int64

func (*Info) GetRoles

func (x *Info) GetRoles() []string

func (*Info) GetSubject

func (x *Info) GetSubject() permission.Subject

func (*Info) GetType

func (x *Info) GetType() Type

func (*Info) ProtoMessage

func (*Info) ProtoMessage()

func (*Info) ProtoReflect

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

func (*Info) Reset

func (x *Info) Reset()

func (*Info) String

func (x *Info) String() string

type Type

type Type int32

Secret type.

const (
	Type_CLIENT Type = 0 // For client usage
	Type_SERVER Type = 1 // For server usage
)

func (Type) Descriptor

func (Type) Descriptor() protoreflect.EnumDescriptor

func (Type) Enum

func (x Type) Enum() *Type

func (Type) EnumDescriptor deprecated

func (Type) EnumDescriptor() ([]byte, []int)

Deprecated: Use Type.Descriptor instead.

func (Type) Number

func (x Type) Number() protoreflect.EnumNumber

func (Type) String

func (x Type) String() string

func (Type) Type

func (Type) Type() protoreflect.EnumType

Jump to

Keyboard shortcuts

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