rains

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2022 License: Apache-2.0 Imports: 11 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Query

func Query(name, context string, types []Type, opts []Option,
	expire, timeout time.Duration, addr net.Addr) (map[Type]string, error)

Query queries the RAINS server at addr for name and returns a map of values each corresponding to a type requested by types

Types

type Message

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

Message carries the reply received from the a RAINS server

func QueryRaw

func QueryRaw(name, context string, types []Type, opts []Option,
	expire, timeout time.Duration, addr net.Addr) (Message, error)

QueryRaw queries the RAINS server at addr for name and returns the raw reply

func (*Message) ParseMessage

func (m *Message) ParseMessage() (map[Type]string, error)

ParseMessage parses the message and returns a map mapping all object types found in the assertion to their value

func (Message) String

func (m Message) String() string

type Option

type Option int

Option enables a client or server to specify performance/privacy tradeoffs

const (
	QOMinE2ELatency Option = iota + 1
	QOMinLastHopAnswerSize
	QOMinInfoLeakage
	QOCachedAnswersOnly
	QOExpiredAssertionsOk
	QOTokenTracing
	QONoVerificationDelegation
	QONoProactiveCaching
	QOMaxFreshness
)

func AllOptions

func AllOptions() []Option

AllOptions returns all query options

func (Option) String

func (i Option) String() string

type Type

type Type int

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

const (
	OTName Type = iota + 1
	OTIP6Addr
	OTIP4Addr
	OTRedirection
	OTDelegation
	OTNameset
	OTCertInfo
	OTServiceInfo
	OTRegistrar
	OTRegistrant
	OTInfraKey
	OTExtraKey
	OTNextKey
	OTScionAddr
)

func AllTypes

func AllTypes() []Type

AllTypes returns all object types

func (Type) String

func (i Type) String() string

Jump to

Keyboard shortcuts

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