object

package
v0.0.0-...-682d07f Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2018 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Certificate

type Certificate struct {
	Type     ProtocolType
	Usage    CertificateUsage
	HashAlgo algorithmTypes.Hash
	Data     []byte
}

Certificate contains a certificate and its meta data (type, usage and hash algorithm identifier)

func (Certificate) CompareTo

func (c Certificate) CompareTo(cert Certificate) int

CompareTo compares two certificateObject objects and returns 0 if they are equal, 1 if c is greater than cert and -1 if c is smaller than cert

func (Certificate) String

func (c Certificate) String() string

String implements Stringer interface

type CertificateUsage

type CertificateUsage int

CertificateUsage is an identifier for a certificate usage. The ID is chosen according to the RAINS Protocol Specification.

const (
	CUTrustAnchor CertificateUsage = 2
	CUEndEntity   CertificateUsage = 3
)

type Name

type Name struct {
	Name string
	//Types for which the Name is valid
	Types []Type
}

Name contains a name associated with a name as an alias. Types specifies for which object connection the alias is valid

func (Name) CompareTo

func (n Name) CompareTo(nameObj Name) int

CompareTo compares two nameObjects and returns 0 if they are equal, 1 if n is greater than nameObject and -1 if n is smaller than nameObject

type NamesetExpr

type NamesetExpr string

NamesetExpr encodes a modified POSIX Extended Regular Expression format

type Object

type Object struct {
	Type  Type
	Value interface{}
}

Object contains a Value of to the specified Type

func ContainsType

func ContainsType(objects []Object, oType Type) (Object, bool)

ContainsType returns the first object with oType and true if objects contains at least one

func (Object) CompareTo

func (o Object) CompareTo(object Object) int

CompareTo compares two objects and returns 0 if they are equal, 1 if o is greater than object and -1 if o is smaller than object

func (Object) MarshalCBOR

func (obj Object) MarshalCBOR(w *cbor.CBORWriter) error

MarshalCBOR implements a CBORMarshaler.

func (*Object) Sort

func (o *Object) Sort()

Sort sorts the content of o lexicographically.

func (Object) String

func (o Object) String() string

String implements Stringer interface

func (*Object) UnmarshalArray

func (obj *Object) UnmarshalArray(in []interface{}) error

UnmarshalArray takes in a CBOR decoded array and populates the object.

type ProtocolType

type ProtocolType int

ProtocolType is an identifier for a protocol. The ID is chosen according to the RAINS Protocol Specification.

const (
	PTUnspecified ProtocolType = 0
	PTTLS         ProtocolType = 1
)

type ServiceInfo

type ServiceInfo struct {
	Name     string
	Port     uint16
	Priority uint
}

ServiceInfo contains information how to access a named service

func (ServiceInfo) CompareTo

func (s ServiceInfo) CompareTo(serviceInfo ServiceInfo) int

CompareTo compares two serviceInfo objects and returns 0 if they are equal, 1 if s is greater than serviceInfo and -1 if s is smaller than serviceInfo

type Type

type Type int

Type identifier for object connection. ID chosen according to RAINS Protocol Specification

const (
	OTName        Type = 1
	OTIP6Addr     Type = 2
	OTIP4Addr     Type = 3
	OTRedirection Type = 4
	OTDelegation  Type = 5
	OTNameset     Type = 6
	OTCertInfo    Type = 7
	OTServiceInfo Type = 8
	OTRegistrar   Type = 9
	OTRegistrant  Type = 10
	OTInfraKey    Type = 11
	OTExtraKey    Type = 12
	OTNextKey     Type = 13
)

func (Type) String

func (o Type) String() string

String returns the ID as a string

Jump to

Keyboard shortcuts

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