pb

package
v0.0.0-...-4380e07 Latest Latest
Warning

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

Go to latest
Published: May 27, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RType_name = map[int32]string{
	0:     "None",
	1:     "A",
	2:     "NS",
	3:     "MD",
	4:     "MF",
	5:     "CNAME",
	6:     "SOA",
	7:     "MB",
	8:     "MG",
	9:     "MR",
	10:    "NULL",
	12:    "PTR",
	13:    "HINFO",
	14:    "MINFO",
	15:    "MX",
	16:    "TXT",
	17:    "RP",
	18:    "AFSDB",
	19:    "X25",
	20:    "ISDN",
	21:    "RT",
	23:    "NSAPPTR",
	24:    "SIG",
	25:    "KEY",
	26:    "PX",
	27:    "GPOS",
	28:    "AAAA",
	29:    "LOC",
	30:    "NXT",
	31:    "EID",
	32:    "NIMLOC",
	33:    "SRV",
	34:    "ATMA",
	35:    "NAPTR",
	36:    "KX",
	37:    "CERT",
	39:    "DNAME",
	41:    "OPT",
	43:    "DS",
	44:    "SSHFP",
	46:    "RRSIG",
	47:    "NSEC",
	48:    "DNSKEY",
	49:    "DHCID",
	50:    "NSEC3",
	51:    "NSEC3PARAM",
	52:    "TLSA",
	53:    "SMIMEA",
	55:    "HIP",
	56:    "NINFO",
	57:    "RKEY",
	58:    "TALINK",
	59:    "CDS",
	60:    "CDNSKEY",
	61:    "OPENPGPKEY",
	99:    "SPF",
	100:   "UINFO",
	101:   "UID",
	102:   "GID",
	103:   "UNSPEC",
	104:   "NID",
	105:   "L32",
	106:   "L64",
	107:   "LP",
	108:   "EUI48",
	109:   "EUI64",
	256:   "URI",
	257:   "CAA",
	258:   "AVC",
	249:   "TKEY",
	250:   "TSIG",
	251:   "IXFR",
	252:   "AXFR",
	253:   "MAILB",
	254:   "MAILA",
	255:   "ANY",
	32768: "TA",
	32769: "DLV",
	65535: "Reserved",
}
View Source
var RType_value = map[string]int32{
	"None":       0,
	"A":          1,
	"NS":         2,
	"MD":         3,
	"MF":         4,
	"CNAME":      5,
	"SOA":        6,
	"MB":         7,
	"MG":         8,
	"MR":         9,
	"NULL":       10,
	"PTR":        12,
	"HINFO":      13,
	"MINFO":      14,
	"MX":         15,
	"TXT":        16,
	"RP":         17,
	"AFSDB":      18,
	"X25":        19,
	"ISDN":       20,
	"RT":         21,
	"NSAPPTR":    23,
	"SIG":        24,
	"KEY":        25,
	"PX":         26,
	"GPOS":       27,
	"AAAA":       28,
	"LOC":        29,
	"NXT":        30,
	"EID":        31,
	"NIMLOC":     32,
	"SRV":        33,
	"ATMA":       34,
	"NAPTR":      35,
	"KX":         36,
	"CERT":       37,
	"DNAME":      39,
	"OPT":        41,
	"DS":         43,
	"SSHFP":      44,
	"RRSIG":      46,
	"NSEC":       47,
	"DNSKEY":     48,
	"DHCID":      49,
	"NSEC3":      50,
	"NSEC3PARAM": 51,
	"TLSA":       52,
	"SMIMEA":     53,
	"HIP":        55,
	"NINFO":      56,
	"RKEY":       57,
	"TALINK":     58,
	"CDS":        59,
	"CDNSKEY":    60,
	"OPENPGPKEY": 61,
	"SPF":        99,
	"UINFO":      100,
	"UID":        101,
	"GID":        102,
	"UNSPEC":     103,
	"NID":        104,
	"L32":        105,
	"L64":        106,
	"LP":         107,
	"EUI48":      108,
	"EUI64":      109,
	"URI":        256,
	"CAA":        257,
	"AVC":        258,
	"TKEY":       249,
	"TSIG":       250,
	"IXFR":       251,
	"AXFR":       252,
	"MAILB":      253,
	"MAILA":      254,
	"ANY":        255,
	"TA":         32768,
	"DLV":        32769,
	"Reserved":   65535,
}

Functions

func RegisterControlServer

func RegisterControlServer(s *grpc.Server, srv ControlServer)

Types

type ControlClient

type ControlClient interface {
	SetAuthoritativeHost(ctx context.Context, in *HostRecordSet, opts ...grpc.CallOption) (*empty.Empty, error)
	DeleteAuthoritative(ctx context.Context, in *RecordSet, opts ...grpc.CallOption) (*empty.Empty, error)
}

ControlClient is the client API for Control service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewControlClient

func NewControlClient(cc *grpc.ClientConn) ControlClient

type ControlServer

type ControlServer interface {
	SetAuthoritativeHost(context.Context, *HostRecordSet) (*empty.Empty, error)
	DeleteAuthoritative(context.Context, *RecordSet) (*empty.Empty, error)
}

ControlServer is the server API for Control service.

type HostRecordSet

type HostRecordSet struct {
	RecordType           RType    `protobuf:"varint,1,opt,name=record_type,json=recordType,proto3,enum=pb.RType" json:"record_type,omitempty"`
	Fqdn                 string   `protobuf:"bytes,2,opt,name=fqdn,proto3" json:"fqdn,omitempty"`
	Addresses            [][]byte `protobuf:"bytes,3,rep,name=addresses,proto3" json:"addresses,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*HostRecordSet) Descriptor

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

func (*HostRecordSet) GetAddresses

func (m *HostRecordSet) GetAddresses() [][]byte

func (*HostRecordSet) GetFqdn

func (m *HostRecordSet) GetFqdn() string

func (*HostRecordSet) GetRecordType

func (m *HostRecordSet) GetRecordType() RType

func (*HostRecordSet) ProtoMessage

func (*HostRecordSet) ProtoMessage()

func (*HostRecordSet) Reset

func (m *HostRecordSet) Reset()

func (*HostRecordSet) String

func (m *HostRecordSet) String() string

func (*HostRecordSet) XXX_DiscardUnknown

func (m *HostRecordSet) XXX_DiscardUnknown()

func (*HostRecordSet) XXX_Marshal

func (m *HostRecordSet) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*HostRecordSet) XXX_Merge

func (m *HostRecordSet) XXX_Merge(src proto.Message)

func (*HostRecordSet) XXX_Size

func (m *HostRecordSet) XXX_Size() int

func (*HostRecordSet) XXX_Unmarshal

func (m *HostRecordSet) XXX_Unmarshal(b []byte) error

type RType

type RType int32

DNS Resource Record (https://www.iana.org/assignments/dns-parameters/dns-parameters.xhtml#dns-parameters-4)

const (
	RType_None       RType = 0
	RType_A          RType = 1
	RType_NS         RType = 2
	RType_MD         RType = 3
	RType_MF         RType = 4
	RType_CNAME      RType = 5
	RType_SOA        RType = 6
	RType_MB         RType = 7
	RType_MG         RType = 8
	RType_MR         RType = 9
	RType_NULL       RType = 10
	RType_PTR        RType = 12
	RType_HINFO      RType = 13
	RType_MINFO      RType = 14
	RType_MX         RType = 15
	RType_TXT        RType = 16
	RType_RP         RType = 17
	RType_AFSDB      RType = 18
	RType_X25        RType = 19
	RType_ISDN       RType = 20
	RType_RT         RType = 21
	RType_NSAPPTR    RType = 23
	RType_SIG        RType = 24
	RType_KEY        RType = 25
	RType_PX         RType = 26
	RType_GPOS       RType = 27
	RType_AAAA       RType = 28
	RType_LOC        RType = 29
	RType_NXT        RType = 30
	RType_EID        RType = 31
	RType_NIMLOC     RType = 32
	RType_SRV        RType = 33
	RType_ATMA       RType = 34
	RType_NAPTR      RType = 35
	RType_KX         RType = 36
	RType_CERT       RType = 37
	RType_DNAME      RType = 39
	RType_OPT        RType = 41
	RType_DS         RType = 43
	RType_SSHFP      RType = 44
	RType_RRSIG      RType = 46
	RType_NSEC       RType = 47
	RType_DNSKEY     RType = 48
	RType_DHCID      RType = 49
	RType_NSEC3      RType = 50
	RType_NSEC3PARAM RType = 51
	RType_TLSA       RType = 52
	RType_SMIMEA     RType = 53
	RType_HIP        RType = 55
	RType_NINFO      RType = 56
	RType_RKEY       RType = 57
	RType_TALINK     RType = 58
	RType_CDS        RType = 59
	RType_CDNSKEY    RType = 60
	RType_OPENPGPKEY RType = 61
	RType_SPF        RType = 99
	RType_UINFO      RType = 100
	RType_UID        RType = 101
	RType_GID        RType = 102
	RType_UNSPEC     RType = 103
	RType_NID        RType = 104
	RType_L32        RType = 105
	RType_L64        RType = 106
	RType_LP         RType = 107
	RType_EUI48      RType = 108
	RType_EUI64      RType = 109
	RType_URI        RType = 256
	RType_CAA        RType = 257
	RType_AVC        RType = 258
	RType_TKEY       RType = 249
	RType_TSIG       RType = 250
	// valid Question.Q only
	RType_IXFR     RType = 251
	RType_AXFR     RType = 252
	RType_MAILB    RType = 253
	RType_MAILA    RType = 254
	RType_ANY      RType = 255
	RType_TA       RType = 32768
	RType_DLV      RType = 32769
	RType_Reserved RType = 65535
)

func (RType) EnumDescriptor

func (RType) EnumDescriptor() ([]byte, []int)

func (RType) String

func (x RType) String() string

type RecordSet

type RecordSet struct {
	RecordType           RType    `protobuf:"varint,1,opt,name=record_type,json=recordType,proto3,enum=pb.RType" json:"record_type,omitempty"`
	Fqdn                 string   `protobuf:"bytes,2,opt,name=fqdn,proto3" json:"fqdn,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

RecordSet represents all values associated with an FQDN and type

Example: An A record for foo.example.org may have one or more addresses, and the corresponding RecordSet includes all addresses.

func (*RecordSet) Descriptor

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

func (*RecordSet) GetFqdn

func (m *RecordSet) GetFqdn() string

func (*RecordSet) GetRecordType

func (m *RecordSet) GetRecordType() RType

func (*RecordSet) ProtoMessage

func (*RecordSet) ProtoMessage()

func (*RecordSet) Reset

func (m *RecordSet) Reset()

func (*RecordSet) String

func (m *RecordSet) String() string

func (*RecordSet) XXX_DiscardUnknown

func (m *RecordSet) XXX_DiscardUnknown()

func (*RecordSet) XXX_Marshal

func (m *RecordSet) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*RecordSet) XXX_Merge

func (m *RecordSet) XXX_Merge(src proto.Message)

func (*RecordSet) XXX_Size

func (m *RecordSet) XXX_Size() int

func (*RecordSet) XXX_Unmarshal

func (m *RecordSet) XXX_Unmarshal(b []byte) error

Jump to

Keyboard shortcuts

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