accessbox

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2021 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_creds_accessbox_accessbox_proto protoreflect.FileDescriptor

Functions

func PackTokens added in v0.16.0

func PackTokens(gatesData []*GateData) (*AccessBox, *Secrets, error)

PackTokens adds a bearer and session tokens to BearerTokens and SessionToken lists respectively. Session token can be nil.

Types

type AccessBox added in v0.16.0

type AccessBox struct {
	OwnerPublicKey []byte            `protobuf:"bytes,1,opt,name=ownerPublicKey,proto3" json:"ownerPublicKey,omitempty"`
	Gates          []*AccessBox_Gate `protobuf:"bytes,2,rep,name=gates,proto3" json:"gates,omitempty"`
	// contains filtered or unexported fields
}

func (*AccessBox) Descriptor deprecated added in v0.16.0

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

Deprecated: Use AccessBox.ProtoReflect.Descriptor instead.

func (*AccessBox) GetGates added in v0.16.0

func (x *AccessBox) GetGates() []*AccessBox_Gate

func (*AccessBox) GetOwnerPublicKey added in v0.16.0

func (x *AccessBox) GetOwnerPublicKey() []byte

func (*AccessBox) GetTokens added in v0.16.0

func (x *AccessBox) GetTokens(owner *keys.PrivateKey) (*GateData, error)

GetTokens returns gate tokens from AccessBox.

func (*AccessBox) Marshal added in v0.16.0

func (x *AccessBox) Marshal() ([]byte, error)

Marshal returns the wire-format of AccessBox.

func (*AccessBox) ProtoMessage added in v0.16.0

func (*AccessBox) ProtoMessage()

func (*AccessBox) ProtoReflect added in v0.16.0

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

func (*AccessBox) Reset added in v0.16.0

func (x *AccessBox) Reset()

func (*AccessBox) String added in v0.16.0

func (x *AccessBox) String() string

func (*AccessBox) Unmarshal added in v0.16.0

func (x *AccessBox) Unmarshal(data []byte) error

Unmarshal parses the wire-format message and put data to x.

type AccessBox_Gate added in v0.16.0

type AccessBox_Gate struct {
	Tokens        []byte `protobuf:"bytes,1,opt,name=tokens,proto3" json:"tokens,omitempty"`
	GatePublicKey []byte `protobuf:"bytes,2,opt,name=gatePublicKey,proto3" json:"gatePublicKey,omitempty"`
	// contains filtered or unexported fields
}

func (*AccessBox_Gate) Descriptor deprecated added in v0.16.0

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

Deprecated: Use AccessBox_Gate.ProtoReflect.Descriptor instead.

func (*AccessBox_Gate) GetGatePublicKey added in v0.16.0

func (x *AccessBox_Gate) GetGatePublicKey() []byte

func (*AccessBox_Gate) GetTokens added in v0.16.0

func (x *AccessBox_Gate) GetTokens() []byte

func (*AccessBox_Gate) ProtoMessage added in v0.16.0

func (*AccessBox_Gate) ProtoMessage()

func (*AccessBox_Gate) ProtoReflect added in v0.16.0

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

func (*AccessBox_Gate) Reset added in v0.16.0

func (x *AccessBox_Gate) Reset()

func (*AccessBox_Gate) String added in v0.16.0

func (x *AccessBox_Gate) String() string

type GateData added in v0.16.0

type GateData struct {
	AccessKey    string
	BearerToken  *token.BearerToken
	SessionToken *session.Token
	GateKey      *keys.PublicKey
}

GateData represents gate tokens in AccessBox.

func NewGateData added in v0.16.0

func NewGateData(gateKey *keys.PublicKey, bearerTkn *token.BearerToken) *GateData

NewGateData returns GateData from provided bearer token and public gate key.

type Secrets added in v0.16.0

type Secrets struct {
	AccessKey    string
	EphemeralKey *keys.PrivateKey
}

Secrets represents AccessKey and key to encrypt gate tokens.

type Tokens added in v0.16.0

type Tokens struct {
	AccessKey    []byte `protobuf:"bytes,1,opt,name=accessKey,proto3" json:"accessKey,omitempty"`
	BearerToken  []byte `protobuf:"bytes,2,opt,name=bearerToken,proto3" json:"bearerToken,omitempty"`
	SessionToken []byte `protobuf:"bytes,3,opt,name=sessionToken,proto3" json:"sessionToken,omitempty"`
	// contains filtered or unexported fields
}

func (*Tokens) Descriptor deprecated added in v0.16.0

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

Deprecated: Use Tokens.ProtoReflect.Descriptor instead.

func (*Tokens) GetAccessKey added in v0.16.0

func (x *Tokens) GetAccessKey() []byte

func (*Tokens) GetBearerToken added in v0.16.0

func (x *Tokens) GetBearerToken() []byte

func (*Tokens) GetSessionToken added in v0.16.0

func (x *Tokens) GetSessionToken() []byte

func (*Tokens) ProtoMessage added in v0.16.0

func (*Tokens) ProtoMessage()

func (*Tokens) ProtoReflect added in v0.16.0

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

func (*Tokens) Reset added in v0.16.0

func (x *Tokens) Reset()

func (*Tokens) String added in v0.16.0

func (x *Tokens) String() string

Jump to

Keyboard shortcuts

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