query

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: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Name

type Name struct {
	Context     string
	Name        string
	Types       []object.Type
	Expiration  int64 //unix seconds
	Options     []Option
	KeyPhase    int
	CurrentTime int64
}

Name contains information about the query

func (*Name) CompareTo

func (q *Name) CompareTo(query *Name) int

CompareTo compares two queries and returns 0 if they are equal, 1 if q is greater than query and -1 if q is smaller than query

func (*Name) ContainsOption

func (q *Name) ContainsOption(option Option) bool

ContainsOption returns true if the query contains the given query option.

func (*Name) GetContext

func (q *Name) GetContext() string

GetContext returns q's context

func (*Name) GetExpiration

func (q *Name) GetExpiration() int64

GetExpiration returns q's expiration

func (*Name) MarshalCBOR

func (q *Name) MarshalCBOR(w *cbor.CBORWriter) error

MarshalCBOR implements the CBORMarshaler interface.

func (*Name) Sort

func (q *Name) Sort()

Sort sorts the content of the query lexicographically.

func (*Name) String

func (q *Name) String() string

String implements Stringer interface

func (*Name) UnmarshalMap

func (q *Name) UnmarshalMap(m map[int]interface{}) error

UnmarshalMap unpacks a CBOR marshaled map to this struct.

type Option

type Option int

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

const (
	QOMinE2ELatency            Option = 1
	QOMinLastHopAnswerSize     Option = 2
	QOMinInfoLeakage           Option = 3
	QOCachedAnswersOnly        Option = 4
	QOExpiredAssertionsOk      Option = 5
	QOTokenTracing             Option = 6
	QONoVerificationDelegation Option = 7
	QONoProactiveCaching       Option = 8
	QOMaxFreshness             Option = 9
)

func (Option) String

func (i Option) String() string

Jump to

Keyboard shortcuts

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