backendpb

package
v0.0.0-...-b6e3791 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2024 License: AGPL-3.0 Imports: 33 Imported by: 0

Documentation

Overview

Package backendpb contains the protobuf structures for the backend API.

Index

Constants

View Source
const (
	DNSService_GetDNSProfiles_FullMethodName         = "/DNSService/getDNSProfiles"
	DNSService_SaveDevicesBillingStat_FullMethodName = "/DNSService/saveDevicesBillingStat"
)

Variables

View Source
var DNSService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "DNSService",
	HandlerType: (*DNSServiceServer)(nil),
	Methods:     []grpc.MethodDesc{},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "getDNSProfiles",
			Handler:       _DNSService_GetDNSProfiles_Handler,
			ServerStreams: true,
		},
		{
			StreamName:    "saveDevicesBillingStat",
			Handler:       _DNSService_SaveDevicesBillingStat_Handler,
			ClientStreams: true,
		},
	},
	Metadata: "backend.proto",
}

DNSService_ServiceDesc is the grpc.ServiceDesc for DNSService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

View Source
var File_backend_proto protoreflect.FileDescriptor

Functions

func RegisterDNSServiceServer

func RegisterDNSServiceServer(s grpc.ServiceRegistrar, srv DNSServiceServer)

Types

type AccessSettings

type AccessSettings struct {
	AllowlistCidr        []*CidrRange `protobuf:"bytes,1,rep,name=allowlist_cidr,json=allowlistCidr,proto3" json:"allowlist_cidr,omitempty"`
	BlocklistCidr        []*CidrRange `protobuf:"bytes,2,rep,name=blocklist_cidr,json=blocklistCidr,proto3" json:"blocklist_cidr,omitempty"`
	AllowlistAsn         []uint32     `protobuf:"varint,3,rep,packed,name=allowlist_asn,json=allowlistAsn,proto3" json:"allowlist_asn,omitempty"`
	BlocklistAsn         []uint32     `protobuf:"varint,4,rep,packed,name=blocklist_asn,json=blocklistAsn,proto3" json:"blocklist_asn,omitempty"`
	BlocklistDomainRules []string     `protobuf:"bytes,5,rep,name=blocklist_domain_rules,json=blocklistDomainRules,proto3" json:"blocklist_domain_rules,omitempty"`
	Enabled              bool         `protobuf:"varint,6,opt,name=enabled,proto3" json:"enabled,omitempty"`
	// contains filtered or unexported fields
}

func (*AccessSettings) Descriptor deprecated

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

Deprecated: Use AccessSettings.ProtoReflect.Descriptor instead.

func (*AccessSettings) GetAllowlistAsn

func (x *AccessSettings) GetAllowlistAsn() []uint32

func (*AccessSettings) GetAllowlistCidr

func (x *AccessSettings) GetAllowlistCidr() []*CidrRange

func (*AccessSettings) GetBlocklistAsn

func (x *AccessSettings) GetBlocklistAsn() []uint32

func (*AccessSettings) GetBlocklistCidr

func (x *AccessSettings) GetBlocklistCidr() []*CidrRange

func (*AccessSettings) GetBlocklistDomainRules

func (x *AccessSettings) GetBlocklistDomainRules() []string

func (*AccessSettings) GetEnabled

func (x *AccessSettings) GetEnabled() bool

func (*AccessSettings) ProtoMessage

func (*AccessSettings) ProtoMessage()

func (*AccessSettings) ProtoReflect

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

func (*AccessSettings) Reset

func (x *AccessSettings) Reset()

func (*AccessSettings) String

func (x *AccessSettings) String() string

type BillStat

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

BillStat is the implementation of the billstat.Uploader interface that uploads the billing statistics to the business logic backend. It is safe for concurrent use.

TODO(a.garipov): Consider uniting with ProfileStorage into a single backendpb.Client.

func NewBillStat

func NewBillStat(c *BillStatConfig) (b *BillStat, err error)

NewBillStat creates a new billing statistics uploader. c must not be nil.

func (*BillStat) Upload

func (b *BillStat) Upload(ctx context.Context, records billstat.Records) (err error)

Upload implements the billstat.Uploader interface for *BillStat.

type BillStatConfig

type BillStatConfig struct {
	// ErrColl is the error collector that is used to collect critical and
	// non-critical errors.
	ErrColl errcoll.Interface

	// Endpoint is the backend API URL.  The scheme should be either "grpc" or
	// "grpcs".
	Endpoint *url.URL
}

BillStatConfig is the configuration structure for the business logic backend billing statistics uploader.

type BlockingModeCustomIP

type BlockingModeCustomIP struct {
	Ipv4 []byte `protobuf:"bytes,1,opt,name=ipv4,proto3" json:"ipv4,omitempty"`
	Ipv6 []byte `protobuf:"bytes,2,opt,name=ipv6,proto3" json:"ipv6,omitempty"`
	// contains filtered or unexported fields
}

func (*BlockingModeCustomIP) Descriptor deprecated

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

Deprecated: Use BlockingModeCustomIP.ProtoReflect.Descriptor instead.

func (*BlockingModeCustomIP) GetIpv4

func (x *BlockingModeCustomIP) GetIpv4() []byte

func (*BlockingModeCustomIP) GetIpv6

func (x *BlockingModeCustomIP) GetIpv6() []byte

func (*BlockingModeCustomIP) ProtoMessage

func (*BlockingModeCustomIP) ProtoMessage()

func (*BlockingModeCustomIP) ProtoReflect

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

func (*BlockingModeCustomIP) Reset

func (x *BlockingModeCustomIP) Reset()

func (*BlockingModeCustomIP) String

func (x *BlockingModeCustomIP) String() string

type BlockingModeNXDOMAIN

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

func (*BlockingModeNXDOMAIN) Descriptor deprecated

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

Deprecated: Use BlockingModeNXDOMAIN.ProtoReflect.Descriptor instead.

func (*BlockingModeNXDOMAIN) ProtoMessage

func (*BlockingModeNXDOMAIN) ProtoMessage()

func (*BlockingModeNXDOMAIN) ProtoReflect

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

func (*BlockingModeNXDOMAIN) Reset

func (x *BlockingModeNXDOMAIN) Reset()

func (*BlockingModeNXDOMAIN) String

func (x *BlockingModeNXDOMAIN) String() string

type BlockingModeNullIP

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

func (*BlockingModeNullIP) Descriptor deprecated

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

Deprecated: Use BlockingModeNullIP.ProtoReflect.Descriptor instead.

func (*BlockingModeNullIP) ProtoMessage

func (*BlockingModeNullIP) ProtoMessage()

func (*BlockingModeNullIP) ProtoReflect

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

func (*BlockingModeNullIP) Reset

func (x *BlockingModeNullIP) Reset()

func (*BlockingModeNullIP) String

func (x *BlockingModeNullIP) String() string

type BlockingModeREFUSED

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

func (*BlockingModeREFUSED) Descriptor deprecated

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

Deprecated: Use BlockingModeREFUSED.ProtoReflect.Descriptor instead.

func (*BlockingModeREFUSED) ProtoMessage

func (*BlockingModeREFUSED) ProtoMessage()

func (*BlockingModeREFUSED) ProtoReflect

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

func (*BlockingModeREFUSED) Reset

func (x *BlockingModeREFUSED) Reset()

func (*BlockingModeREFUSED) String

func (x *BlockingModeREFUSED) String() string

type CidrRange

type CidrRange struct {
	Address []byte `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
	Prefix  uint32 `protobuf:"varint,2,opt,name=prefix,proto3" json:"prefix,omitempty"`
	// contains filtered or unexported fields
}

func (*CidrRange) Descriptor deprecated

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

Deprecated: Use CidrRange.ProtoReflect.Descriptor instead.

func (*CidrRange) GetAddress

func (x *CidrRange) GetAddress() []byte

func (*CidrRange) GetPrefix

func (x *CidrRange) GetPrefix() uint32

func (*CidrRange) ProtoMessage

func (*CidrRange) ProtoMessage()

func (*CidrRange) ProtoReflect

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

func (*CidrRange) Reset

func (x *CidrRange) Reset()

func (*CidrRange) String

func (x *CidrRange) String() string

type DNSProfile

type DNSProfile struct {
	DnsId               string                `protobuf:"bytes,1,opt,name=dns_id,json=dnsId,proto3" json:"dns_id,omitempty"`
	FilteringEnabled    bool                  `protobuf:"varint,2,opt,name=filtering_enabled,json=filteringEnabled,proto3" json:"filtering_enabled,omitempty"`
	QueryLogEnabled     bool                  `protobuf:"varint,3,opt,name=query_log_enabled,json=queryLogEnabled,proto3" json:"query_log_enabled,omitempty"`
	Deleted             bool                  `protobuf:"varint,4,opt,name=deleted,proto3" json:"deleted,omitempty"`
	SafeBrowsing        *SafeBrowsingSettings `protobuf:"bytes,5,opt,name=safe_browsing,json=safeBrowsing,proto3" json:"safe_browsing,omitempty"`
	Parental            *ParentalSettings     `protobuf:"bytes,6,opt,name=parental,proto3" json:"parental,omitempty"`
	RuleLists           *RuleListsSettings    `protobuf:"bytes,7,opt,name=rule_lists,json=ruleLists,proto3" json:"rule_lists,omitempty"`
	Devices             []*DeviceSettings     `protobuf:"bytes,8,rep,name=devices,proto3" json:"devices,omitempty"`
	CustomRules         []string              `protobuf:"bytes,9,rep,name=custom_rules,json=customRules,proto3" json:"custom_rules,omitempty"`
	FilteredResponseTtl *durationpb.Duration  `protobuf:"bytes,10,opt,name=filtered_response_ttl,json=filteredResponseTtl,proto3" json:"filtered_response_ttl,omitempty"`
	BlockPrivateRelay   bool                  `protobuf:"varint,11,opt,name=block_private_relay,json=blockPrivateRelay,proto3" json:"block_private_relay,omitempty"`
	BlockFirefoxCanary  bool                  `protobuf:"varint,12,opt,name=block_firefox_canary,json=blockFirefoxCanary,proto3" json:"block_firefox_canary,omitempty"`
	// Types that are assignable to BlockingMode:
	//
	//	*DNSProfile_BlockingModeCustomIp
	//	*DNSProfile_BlockingModeNxdomain
	//	*DNSProfile_BlockingModeNullIp
	//	*DNSProfile_BlockingModeRefused
	BlockingMode isDNSProfile_BlockingMode `protobuf_oneof:"blocking_mode"`
	IpLogEnabled bool                      `protobuf:"varint,17,opt,name=ip_log_enabled,json=ipLogEnabled,proto3" json:"ip_log_enabled,omitempty"`
	Access       *AccessSettings           `protobuf:"bytes,18,opt,name=access,proto3" json:"access,omitempty"`
	// contains filtered or unexported fields
}

func (*DNSProfile) Descriptor deprecated

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

Deprecated: Use DNSProfile.ProtoReflect.Descriptor instead.

func (*DNSProfile) GetAccess

func (x *DNSProfile) GetAccess() *AccessSettings

func (*DNSProfile) GetBlockFirefoxCanary

func (x *DNSProfile) GetBlockFirefoxCanary() bool

func (*DNSProfile) GetBlockPrivateRelay

func (x *DNSProfile) GetBlockPrivateRelay() bool

func (*DNSProfile) GetBlockingMode

func (m *DNSProfile) GetBlockingMode() isDNSProfile_BlockingMode

func (*DNSProfile) GetBlockingModeCustomIp

func (x *DNSProfile) GetBlockingModeCustomIp() *BlockingModeCustomIP

func (*DNSProfile) GetBlockingModeNullIp

func (x *DNSProfile) GetBlockingModeNullIp() *BlockingModeNullIP

func (*DNSProfile) GetBlockingModeNxdomain

func (x *DNSProfile) GetBlockingModeNxdomain() *BlockingModeNXDOMAIN

func (*DNSProfile) GetBlockingModeRefused

func (x *DNSProfile) GetBlockingModeRefused() *BlockingModeREFUSED

func (*DNSProfile) GetCustomRules

func (x *DNSProfile) GetCustomRules() []string

func (*DNSProfile) GetDeleted

func (x *DNSProfile) GetDeleted() bool

func (*DNSProfile) GetDevices

func (x *DNSProfile) GetDevices() []*DeviceSettings

func (*DNSProfile) GetDnsId

func (x *DNSProfile) GetDnsId() string

func (*DNSProfile) GetFilteredResponseTtl

func (x *DNSProfile) GetFilteredResponseTtl() *durationpb.Duration

func (*DNSProfile) GetFilteringEnabled

func (x *DNSProfile) GetFilteringEnabled() bool

func (*DNSProfile) GetIpLogEnabled

func (x *DNSProfile) GetIpLogEnabled() bool

func (*DNSProfile) GetParental

func (x *DNSProfile) GetParental() *ParentalSettings

func (*DNSProfile) GetQueryLogEnabled

func (x *DNSProfile) GetQueryLogEnabled() bool

func (*DNSProfile) GetRuleLists

func (x *DNSProfile) GetRuleLists() *RuleListsSettings

func (*DNSProfile) GetSafeBrowsing

func (x *DNSProfile) GetSafeBrowsing() *SafeBrowsingSettings

func (*DNSProfile) ProtoMessage

func (*DNSProfile) ProtoMessage()

func (*DNSProfile) ProtoReflect

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

func (*DNSProfile) Reset

func (x *DNSProfile) Reset()

func (*DNSProfile) String

func (x *DNSProfile) String() string

type DNSProfile_BlockingModeCustomIp

type DNSProfile_BlockingModeCustomIp struct {
	BlockingModeCustomIp *BlockingModeCustomIP `protobuf:"bytes,13,opt,name=blocking_mode_custom_ip,json=blockingModeCustomIp,proto3,oneof"`
}

type DNSProfile_BlockingModeNullIp

type DNSProfile_BlockingModeNullIp struct {
	BlockingModeNullIp *BlockingModeNullIP `protobuf:"bytes,15,opt,name=blocking_mode_null_ip,json=blockingModeNullIp,proto3,oneof"`
}

type DNSProfile_BlockingModeNxdomain

type DNSProfile_BlockingModeNxdomain struct {
	BlockingModeNxdomain *BlockingModeNXDOMAIN `protobuf:"bytes,14,opt,name=blocking_mode_nxdomain,json=blockingModeNxdomain,proto3,oneof"`
}

type DNSProfile_BlockingModeRefused

type DNSProfile_BlockingModeRefused struct {
	BlockingModeRefused *BlockingModeREFUSED `protobuf:"bytes,16,opt,name=blocking_mode_refused,json=blockingModeRefused,proto3,oneof"`
}

type DNSProfilesRequest

type DNSProfilesRequest struct {
	SyncTime *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=sync_time,json=syncTime,proto3" json:"sync_time,omitempty"`
	// contains filtered or unexported fields
}

func (*DNSProfilesRequest) Descriptor deprecated

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

Deprecated: Use DNSProfilesRequest.ProtoReflect.Descriptor instead.

func (*DNSProfilesRequest) GetSyncTime

func (x *DNSProfilesRequest) GetSyncTime() *timestamppb.Timestamp

func (*DNSProfilesRequest) ProtoMessage

func (*DNSProfilesRequest) ProtoMessage()

func (*DNSProfilesRequest) ProtoReflect

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

func (*DNSProfilesRequest) Reset

func (x *DNSProfilesRequest) Reset()

func (*DNSProfilesRequest) String

func (x *DNSProfilesRequest) String() string

type DNSServiceClient

type DNSServiceClient interface {
	// Gets DNS profiles.
	//
	// Field "sync_time" in DNSProfilesRequest - pass to return the latest updates after this time moment.
	//
	// The trailers headers will include a "sync_time", given in milliseconds,
	// that should be used for subsequent incremental DNS profile synchronization requests.
	GetDNSProfiles(ctx context.Context, in *DNSProfilesRequest, opts ...grpc.CallOption) (DNSService_GetDNSProfilesClient, error)
	// Stores devices activity.
	SaveDevicesBillingStat(ctx context.Context, opts ...grpc.CallOption) (DNSService_SaveDevicesBillingStatClient, error)
}

DNSServiceClient is the client API for DNSService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewDNSServiceClient

func NewDNSServiceClient(cc grpc.ClientConnInterface) DNSServiceClient

type DNSServiceServer

type DNSServiceServer interface {
	// Gets DNS profiles.
	//
	// Field "sync_time" in DNSProfilesRequest - pass to return the latest updates after this time moment.
	//
	// The trailers headers will include a "sync_time", given in milliseconds,
	// that should be used for subsequent incremental DNS profile synchronization requests.
	GetDNSProfiles(*DNSProfilesRequest, DNSService_GetDNSProfilesServer) error
	// Stores devices activity.
	SaveDevicesBillingStat(DNSService_SaveDevicesBillingStatServer) error
	// contains filtered or unexported methods
}

DNSServiceServer is the server API for DNSService service. All implementations must embed UnimplementedDNSServiceServer for forward compatibility

type DNSService_GetDNSProfilesClient

type DNSService_GetDNSProfilesClient interface {
	Recv() (*DNSProfile, error)
	grpc.ClientStream
}

type DNSService_GetDNSProfilesServer

type DNSService_GetDNSProfilesServer interface {
	Send(*DNSProfile) error
	grpc.ServerStream
}

type DNSService_SaveDevicesBillingStatClient

type DNSService_SaveDevicesBillingStatClient interface {
	Send(*DeviceBillingStat) error
	CloseAndRecv() (*emptypb.Empty, error)
	grpc.ClientStream
}

type DNSService_SaveDevicesBillingStatServer

type DNSService_SaveDevicesBillingStatServer interface {
	SendAndClose(*emptypb.Empty) error
	Recv() (*DeviceBillingStat, error)
	grpc.ServerStream
}

type DayRange

type DayRange struct {
	Start *durationpb.Duration `protobuf:"bytes,1,opt,name=start,proto3" json:"start,omitempty"`
	End   *durationpb.Duration `protobuf:"bytes,2,opt,name=end,proto3" json:"end,omitempty"`
	// contains filtered or unexported fields
}

func (*DayRange) Descriptor deprecated

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

Deprecated: Use DayRange.ProtoReflect.Descriptor instead.

func (*DayRange) GetEnd

func (x *DayRange) GetEnd() *durationpb.Duration

func (*DayRange) GetStart

func (x *DayRange) GetStart() *durationpb.Duration

func (*DayRange) ProtoMessage

func (*DayRange) ProtoMessage()

func (*DayRange) ProtoReflect

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

func (*DayRange) Reset

func (x *DayRange) Reset()

func (*DayRange) String

func (x *DayRange) String() string

type DeviceBillingStat

type DeviceBillingStat struct {
	LastActivityTime *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=last_activity_time,json=lastActivityTime,proto3" json:"last_activity_time,omitempty"`
	DeviceId         string                 `protobuf:"bytes,2,opt,name=device_id,json=deviceId,proto3" json:"device_id,omitempty"`
	ClientCountry    string                 `protobuf:"bytes,3,opt,name=client_country,json=clientCountry,proto3" json:"client_country,omitempty"`
	// Protocol type. Possible values see here: https://bit.adguard.com/projects/DNS/repos/dns-server/browse#ql-properties
	Proto   uint32 `protobuf:"varint,4,opt,name=proto,proto3" json:"proto,omitempty"`
	Asn     uint32 `protobuf:"varint,5,opt,name=asn,proto3" json:"asn,omitempty"`
	Queries uint32 `protobuf:"varint,6,opt,name=queries,proto3" json:"queries,omitempty"`
	// contains filtered or unexported fields
}

func (*DeviceBillingStat) Descriptor deprecated

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

Deprecated: Use DeviceBillingStat.ProtoReflect.Descriptor instead.

func (*DeviceBillingStat) GetAsn

func (x *DeviceBillingStat) GetAsn() uint32

func (*DeviceBillingStat) GetClientCountry

func (x *DeviceBillingStat) GetClientCountry() string

func (*DeviceBillingStat) GetDeviceId

func (x *DeviceBillingStat) GetDeviceId() string

func (*DeviceBillingStat) GetLastActivityTime

func (x *DeviceBillingStat) GetLastActivityTime() *timestamppb.Timestamp

func (*DeviceBillingStat) GetProto

func (x *DeviceBillingStat) GetProto() uint32

func (*DeviceBillingStat) GetQueries

func (x *DeviceBillingStat) GetQueries() uint32

func (*DeviceBillingStat) ProtoMessage

func (*DeviceBillingStat) ProtoMessage()

func (*DeviceBillingStat) ProtoReflect

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

func (*DeviceBillingStat) Reset

func (x *DeviceBillingStat) Reset()

func (*DeviceBillingStat) String

func (x *DeviceBillingStat) String() string

type DeviceSettings

type DeviceSettings struct {
	Id               string   `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Name             string   `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	FilteringEnabled bool     `protobuf:"varint,3,opt,name=filtering_enabled,json=filteringEnabled,proto3" json:"filtering_enabled,omitempty"`
	LinkedIp         []byte   `protobuf:"bytes,4,opt,name=linked_ip,json=linkedIp,proto3" json:"linked_ip,omitempty"`
	DedicatedIps     [][]byte `protobuf:"bytes,5,rep,name=dedicated_ips,json=dedicatedIps,proto3" json:"dedicated_ips,omitempty"`
	// contains filtered or unexported fields
}

func (*DeviceSettings) Descriptor deprecated

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

Deprecated: Use DeviceSettings.ProtoReflect.Descriptor instead.

func (*DeviceSettings) GetDedicatedIps

func (x *DeviceSettings) GetDedicatedIps() [][]byte

func (*DeviceSettings) GetFilteringEnabled

func (x *DeviceSettings) GetFilteringEnabled() bool

func (*DeviceSettings) GetId

func (x *DeviceSettings) GetId() string

func (*DeviceSettings) GetLinkedIp

func (x *DeviceSettings) GetLinkedIp() []byte

func (*DeviceSettings) GetName

func (x *DeviceSettings) GetName() string

func (*DeviceSettings) ProtoMessage

func (*DeviceSettings) ProtoMessage()

func (*DeviceSettings) ProtoReflect

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

func (*DeviceSettings) Reset

func (x *DeviceSettings) Reset()

func (*DeviceSettings) String

func (x *DeviceSettings) String() string

type ParentalSettings

type ParentalSettings struct {
	Enabled           bool              `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"`
	BlockAdult        bool              `protobuf:"varint,2,opt,name=block_adult,json=blockAdult,proto3" json:"block_adult,omitempty"`
	GeneralSafeSearch bool              `protobuf:"varint,3,opt,name=general_safe_search,json=generalSafeSearch,proto3" json:"general_safe_search,omitempty"`
	YoutubeSafeSearch bool              `protobuf:"varint,4,opt,name=youtube_safe_search,json=youtubeSafeSearch,proto3" json:"youtube_safe_search,omitempty"`
	BlockedServices   []string          `protobuf:"bytes,5,rep,name=blocked_services,json=blockedServices,proto3" json:"blocked_services,omitempty"`
	Schedule          *ScheduleSettings `protobuf:"bytes,6,opt,name=schedule,proto3" json:"schedule,omitempty"`
	// contains filtered or unexported fields
}

func (*ParentalSettings) Descriptor deprecated

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

Deprecated: Use ParentalSettings.ProtoReflect.Descriptor instead.

func (*ParentalSettings) GetBlockAdult

func (x *ParentalSettings) GetBlockAdult() bool

func (*ParentalSettings) GetBlockedServices

func (x *ParentalSettings) GetBlockedServices() []string

func (*ParentalSettings) GetEnabled

func (x *ParentalSettings) GetEnabled() bool

func (*ParentalSettings) GetGeneralSafeSearch

func (x *ParentalSettings) GetGeneralSafeSearch() bool

func (*ParentalSettings) GetSchedule

func (x *ParentalSettings) GetSchedule() *ScheduleSettings

func (*ParentalSettings) GetYoutubeSafeSearch

func (x *ParentalSettings) GetYoutubeSafeSearch() bool

func (*ParentalSettings) ProtoMessage

func (*ParentalSettings) ProtoMessage()

func (*ParentalSettings) ProtoReflect

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

func (*ParentalSettings) Reset

func (x *ParentalSettings) Reset()

func (*ParentalSettings) String

func (x *ParentalSettings) String() string

type ProfileStorage

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

ProfileStorage is the implementation of the profiledb.Storage interface that retrieves the profile and device information from the business logic backend. It is safe for concurrent use.

func NewProfileStorage

func NewProfileStorage(c *ProfileStorageConfig) (s *ProfileStorage, err error)

NewProfileStorage returns a new ProfileStorage that retrieves information from the business logic backend.

func (*ProfileStorage) Profiles

func (s *ProfileStorage) Profiles(
	ctx context.Context,
	req *profiledb.StorageRequest,
) (resp *profiledb.StorageResponse, err error)

Profiles implements the profiledb.Storage interface for *ProfileStorage.

type ProfileStorageConfig

type ProfileStorageConfig struct {
	// BindSet is the subnet set created from DNS servers listening addresses.
	BindSet netutil.SubnetSet

	// ErrColl is the error collector that is used to collect critical and
	// non-critical errors.
	ErrColl errcoll.Interface

	// Endpoint is the backend API URL.  The scheme should be either "grpc" or
	// "grpcs".
	Endpoint *url.URL
}

ProfileStorageConfig is the configuration for the business logic backend profile storage.

type RuleListsSettings

type RuleListsSettings struct {
	Enabled bool     `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"`
	Ids     []string `protobuf:"bytes,2,rep,name=ids,proto3" json:"ids,omitempty"`
	// contains filtered or unexported fields
}

func (*RuleListsSettings) Descriptor deprecated

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

Deprecated: Use RuleListsSettings.ProtoReflect.Descriptor instead.

func (*RuleListsSettings) GetEnabled

func (x *RuleListsSettings) GetEnabled() bool

func (*RuleListsSettings) GetIds

func (x *RuleListsSettings) GetIds() []string

func (*RuleListsSettings) ProtoMessage

func (*RuleListsSettings) ProtoMessage()

func (*RuleListsSettings) ProtoReflect

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

func (*RuleListsSettings) Reset

func (x *RuleListsSettings) Reset()

func (*RuleListsSettings) String

func (x *RuleListsSettings) String() string

type SafeBrowsingSettings

type SafeBrowsingSettings struct {
	Enabled               bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"`
	BlockDangerousDomains bool `` /* 127-byte string literal not displayed */
	BlockNrd              bool `protobuf:"varint,3,opt,name=block_nrd,json=blockNrd,proto3" json:"block_nrd,omitempty"`
	// contains filtered or unexported fields
}

func (*SafeBrowsingSettings) Descriptor deprecated

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

Deprecated: Use SafeBrowsingSettings.ProtoReflect.Descriptor instead.

func (*SafeBrowsingSettings) GetBlockDangerousDomains

func (x *SafeBrowsingSettings) GetBlockDangerousDomains() bool

func (*SafeBrowsingSettings) GetBlockNrd

func (x *SafeBrowsingSettings) GetBlockNrd() bool

func (*SafeBrowsingSettings) GetEnabled

func (x *SafeBrowsingSettings) GetEnabled() bool

func (*SafeBrowsingSettings) ProtoMessage

func (*SafeBrowsingSettings) ProtoMessage()

func (*SafeBrowsingSettings) ProtoReflect

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

func (*SafeBrowsingSettings) Reset

func (x *SafeBrowsingSettings) Reset()

func (*SafeBrowsingSettings) String

func (x *SafeBrowsingSettings) String() string

type ScheduleSettings

type ScheduleSettings struct {
	Tmz         string       `protobuf:"bytes,1,opt,name=tmz,proto3" json:"tmz,omitempty"`
	WeeklyRange *WeeklyRange `protobuf:"bytes,2,opt,name=weeklyRange,proto3" json:"weeklyRange,omitempty"`
	// contains filtered or unexported fields
}

func (*ScheduleSettings) Descriptor deprecated

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

Deprecated: Use ScheduleSettings.ProtoReflect.Descriptor instead.

func (*ScheduleSettings) GetTmz

func (x *ScheduleSettings) GetTmz() string

func (*ScheduleSettings) GetWeeklyRange

func (x *ScheduleSettings) GetWeeklyRange() *WeeklyRange

func (*ScheduleSettings) ProtoMessage

func (*ScheduleSettings) ProtoMessage()

func (*ScheduleSettings) ProtoReflect

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

func (*ScheduleSettings) Reset

func (x *ScheduleSettings) Reset()

func (*ScheduleSettings) String

func (x *ScheduleSettings) String() string

type UnimplementedDNSServiceServer

type UnimplementedDNSServiceServer struct {
}

UnimplementedDNSServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedDNSServiceServer) GetDNSProfiles

func (UnimplementedDNSServiceServer) SaveDevicesBillingStat

type UnsafeDNSServiceServer

type UnsafeDNSServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeDNSServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to DNSServiceServer will result in compilation errors.

type WeeklyRange

type WeeklyRange struct {
	Mon *DayRange `protobuf:"bytes,1,opt,name=mon,proto3" json:"mon,omitempty"`
	Tue *DayRange `protobuf:"bytes,2,opt,name=tue,proto3" json:"tue,omitempty"`
	Wed *DayRange `protobuf:"bytes,3,opt,name=wed,proto3" json:"wed,omitempty"`
	Thu *DayRange `protobuf:"bytes,4,opt,name=thu,proto3" json:"thu,omitempty"`
	Fri *DayRange `protobuf:"bytes,5,opt,name=fri,proto3" json:"fri,omitempty"`
	Sat *DayRange `protobuf:"bytes,6,opt,name=sat,proto3" json:"sat,omitempty"`
	Sun *DayRange `protobuf:"bytes,7,opt,name=sun,proto3" json:"sun,omitempty"`
	// contains filtered or unexported fields
}

func (*WeeklyRange) Descriptor deprecated

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

Deprecated: Use WeeklyRange.ProtoReflect.Descriptor instead.

func (*WeeklyRange) GetFri

func (x *WeeklyRange) GetFri() *DayRange

func (*WeeklyRange) GetMon

func (x *WeeklyRange) GetMon() *DayRange

func (*WeeklyRange) GetSat

func (x *WeeklyRange) GetSat() *DayRange

func (*WeeklyRange) GetSun

func (x *WeeklyRange) GetSun() *DayRange

func (*WeeklyRange) GetThu

func (x *WeeklyRange) GetThu() *DayRange

func (*WeeklyRange) GetTue

func (x *WeeklyRange) GetTue() *DayRange

func (*WeeklyRange) GetWed

func (x *WeeklyRange) GetWed() *DayRange

func (*WeeklyRange) ProtoMessage

func (*WeeklyRange) ProtoMessage()

func (*WeeklyRange) ProtoReflect

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

func (*WeeklyRange) Reset

func (x *WeeklyRange) Reset()

func (*WeeklyRange) String

func (x *WeeklyRange) String() string

Jump to

Keyboard shortcuts

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