dns

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_proto_dns_proto protoreflect.FileDescriptor

Functions

func NewDnsEndpoints

func NewDnsEndpoints() []*api.Endpoint

func RegisterDnsHandler

func RegisterDnsHandler(s server.Server, hdlr DnsHandler, opts ...server.HandlerOption) error

Types

type Answer

type Answer struct {

	// name resolved
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// type of record
	Type int32 `protobuf:"varint,2,opt,name=type,proto3" json:"type,omitempty"`
	// time to live
	TTL int32 `protobuf:"varint,3,opt,name=TTL,proto3" json:"TTL,omitempty"`
	// the answer
	Data string `protobuf:"bytes,4,opt,name=data,proto3" json:"data,omitempty"`
	// contains filtered or unexported fields
}

func (*Answer) Descriptor deprecated

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

Deprecated: Use Answer.ProtoReflect.Descriptor instead.

func (*Answer) GetData

func (x *Answer) GetData() string

func (*Answer) GetName

func (x *Answer) GetName() string

func (*Answer) GetTTL

func (x *Answer) GetTTL() int32

func (*Answer) GetType

func (x *Answer) GetType() int32

func (*Answer) ProtoMessage

func (*Answer) ProtoMessage()

func (*Answer) ProtoReflect

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

func (*Answer) Reset

func (x *Answer) Reset()

func (*Answer) String

func (x *Answer) String() string

type DnsHandler

type DnsHandler interface {
	Query(context.Context, *QueryRequest, *QueryResponse) error
}

type DnsService

type DnsService interface {
	Query(ctx context.Context, in *QueryRequest, opts ...client.CallOption) (*QueryResponse, error)
}

func NewDnsService

func NewDnsService(name string, c client.Client) DnsService

type QueryRequest

type QueryRequest struct {

	// name to resolve
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// type of query e.g A, AAAA, MX, SRV
	Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"`
	// contains filtered or unexported fields
}

Query an addresss

func (*QueryRequest) Descriptor deprecated

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

Deprecated: Use QueryRequest.ProtoReflect.Descriptor instead.

func (*QueryRequest) GetName

func (x *QueryRequest) GetName() string

func (*QueryRequest) GetType

func (x *QueryRequest) GetType() string

func (*QueryRequest) ProtoMessage

func (*QueryRequest) ProtoMessage()

func (*QueryRequest) ProtoReflect

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

func (*QueryRequest) Reset

func (x *QueryRequest) Reset()

func (*QueryRequest) String

func (x *QueryRequest) String() string

type QueryResponse

type QueryResponse struct {
	Status   int32       `protobuf:"varint,1,opt,name=status,proto3" json:"status,omitempty"`
	TC       bool        `protobuf:"varint,2,opt,name=TC,proto3" json:"TC,omitempty"`
	RD       bool        `protobuf:"varint,3,opt,name=RD,proto3" json:"RD,omitempty"`
	RA       bool        `protobuf:"varint,4,opt,name=RA,proto3" json:"RA,omitempty"`
	AD       bool        `protobuf:"varint,5,opt,name=AD,proto3" json:"AD,omitempty"`
	CD       bool        `protobuf:"varint,6,opt,name=CD,proto3" json:"CD,omitempty"`
	Question []*Question `protobuf:"bytes,7,rep,name=question,proto3" json:"question,omitempty"`
	Answer   []*Answer   `protobuf:"bytes,8,rep,name=answer,proto3" json:"answer,omitempty"`
	Provider string      `protobuf:"bytes,9,opt,name=provider,proto3" json:"provider,omitempty"`
	// contains filtered or unexported fields
}

func (*QueryResponse) Descriptor deprecated

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

Deprecated: Use QueryResponse.ProtoReflect.Descriptor instead.

func (*QueryResponse) GetAD

func (x *QueryResponse) GetAD() bool

func (*QueryResponse) GetAnswer

func (x *QueryResponse) GetAnswer() []*Answer

func (*QueryResponse) GetCD

func (x *QueryResponse) GetCD() bool

func (*QueryResponse) GetProvider

func (x *QueryResponse) GetProvider() string

func (*QueryResponse) GetQuestion

func (x *QueryResponse) GetQuestion() []*Question

func (*QueryResponse) GetRA

func (x *QueryResponse) GetRA() bool

func (*QueryResponse) GetRD

func (x *QueryResponse) GetRD() bool

func (*QueryResponse) GetStatus

func (x *QueryResponse) GetStatus() int32

func (*QueryResponse) GetTC

func (x *QueryResponse) GetTC() bool

func (*QueryResponse) ProtoMessage

func (*QueryResponse) ProtoMessage()

func (*QueryResponse) ProtoReflect

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

func (*QueryResponse) Reset

func (x *QueryResponse) Reset()

func (*QueryResponse) String

func (x *QueryResponse) String() string

type Question

type Question struct {

	// name to query
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// type of record
	Type int32 `protobuf:"varint,2,opt,name=type,proto3" json:"type,omitempty"`
	// contains filtered or unexported fields
}

func (*Question) Descriptor deprecated

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

Deprecated: Use Question.ProtoReflect.Descriptor instead.

func (*Question) GetName

func (x *Question) GetName() string

func (*Question) GetType

func (x *Question) GetType() int32

func (*Question) ProtoMessage

func (*Question) ProtoMessage()

func (*Question) ProtoReflect

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

func (*Question) Reset

func (x *Question) Reset()

func (*Question) String

func (x *Question) String() string

Jump to

Keyboard shortcuts

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