Documentation ¶
Index ¶
- Variables
- func RegisterFederationServer(s *grpc.Server, srv FederationServer)
- type Cursor
- type ExposureKey
- func (*ExposureKey) Descriptor() ([]byte, []int)deprecated
- func (x *ExposureKey) GetDaysSinceOnsetOfSymptoms() int32
- func (x *ExposureKey) GetExposureKey() []byte
- func (x *ExposureKey) GetHasSymptomOnset() bool
- func (x *ExposureKey) GetIntervalCount() int32
- func (x *ExposureKey) GetIntervalNumber() int32
- func (x *ExposureKey) GetRegions() []string
- func (x *ExposureKey) GetReportType() ExposureKey_ReportType
- func (x *ExposureKey) GetTransmissionRisk() int32
- func (x *ExposureKey) GetTraveler() bool
- func (*ExposureKey) ProtoMessage()
- func (x *ExposureKey) ProtoReflect() protoreflect.Message
- func (x *ExposureKey) Reset()
- func (x *ExposureKey) String() string
- type ExposureKey_ReportType
- func (ExposureKey_ReportType) Descriptor() protoreflect.EnumDescriptor
- func (x ExposureKey_ReportType) Enum() *ExposureKey_ReportType
- func (ExposureKey_ReportType) EnumDescriptor() ([]byte, []int)deprecated
- func (x ExposureKey_ReportType) Number() protoreflect.EnumNumber
- func (x ExposureKey_ReportType) String() string
- func (ExposureKey_ReportType) Type() protoreflect.EnumType
- type FederationClient
- type FederationFetchRequest
- func (*FederationFetchRequest) Descriptor() ([]byte, []int)deprecated
- func (x *FederationFetchRequest) GetExcludeRegions() []string
- func (x *FederationFetchRequest) GetIncludeRegions() []string
- func (x *FederationFetchRequest) GetMaxExposureKeys() uint32
- func (x *FederationFetchRequest) GetOnlyLocalProvenance() bool
- func (x *FederationFetchRequest) GetOnlyTravelers() bool
- func (x *FederationFetchRequest) GetState() *FetchState
- func (*FederationFetchRequest) ProtoMessage()
- func (x *FederationFetchRequest) ProtoReflect() protoreflect.Message
- func (x *FederationFetchRequest) Reset()
- func (x *FederationFetchRequest) String() string
- type FederationFetchResponse
- func (*FederationFetchResponse) Descriptor() ([]byte, []int)deprecated
- func (x *FederationFetchResponse) GetKeys() []*ExposureKey
- func (x *FederationFetchResponse) GetNextFetchState() *FetchState
- func (x *FederationFetchResponse) GetPartialResponse() bool
- func (x *FederationFetchResponse) GetRevisedKeys() []*ExposureKey
- func (*FederationFetchResponse) ProtoMessage()
- func (x *FederationFetchResponse) ProtoReflect() protoreflect.Message
- func (x *FederationFetchResponse) Reset()
- func (x *FederationFetchResponse) String() string
- type FederationServer
- type FetchState
- func (*FetchState) Descriptor() ([]byte, []int)deprecated
- func (x *FetchState) GetKeyCursor() *Cursor
- func (x *FetchState) GetRevisedKeyCursor() *Cursor
- func (*FetchState) ProtoMessage()
- func (x *FetchState) ProtoReflect() protoreflect.Message
- func (x *FetchState) Reset()
- func (x *FetchState) String() string
- type UnimplementedFederationServer
Constants ¶
This section is empty.
Variables ¶
var ( ExposureKey_ReportType_name = map[int32]string{ 0: "UNKNOWN", 1: "CONFIRMED_TEST", 2: "CONFIRMED_CLINICAL_DIAGNOSIS", 3: "SELF_REPORT", 4: "RECURSIVE", 5: "REVOKED", } ExposureKey_ReportType_value = map[string]int32{ "UNKNOWN": 0, "CONFIRMED_TEST": 1, "CONFIRMED_CLINICAL_DIAGNOSIS": 2, "SELF_REPORT": 3, "RECURSIVE": 4, "REVOKED": 5, } )
Enum value maps for ExposureKey_ReportType.
var File_internal_pb_federation_federation_proto protoreflect.FileDescriptor
Functions ¶
func RegisterFederationServer ¶
func RegisterFederationServer(s *grpc.Server, srv FederationServer)
Types ¶
type Cursor ¶
type Cursor struct { Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` NextToken string `protobuf:"bytes,2,opt,name=nextToken,proto3" json:"nextToken,omitempty"` // contains filtered or unexported fields }
func (*Cursor) Descriptor
deprecated
func (*Cursor) GetNextToken ¶
func (*Cursor) GetTimestamp ¶
func (*Cursor) ProtoMessage ¶
func (*Cursor) ProtoMessage()
func (*Cursor) ProtoReflect ¶
func (x *Cursor) ProtoReflect() protoreflect.Message
type ExposureKey ¶
type ExposureKey struct { ExposureKey []byte `protobuf:"bytes,1,opt,name=exposureKey,proto3" json:"exposureKey,omitempty"` // required TransmissionRisk int32 `protobuf:"varint,2,opt,name=transmissionRisk,proto3" json:"transmissionRisk,omitempty"` IntervalNumber int32 `protobuf:"varint,3,opt,name=intervalNumber,proto3" json:"intervalNumber,omitempty"` // required IntervalCount int32 `protobuf:"varint,4,opt,name=intervalCount,proto3" json:"intervalCount,omitempty"` // required ReportType ExposureKey_ReportType `protobuf:"varint,5,opt,name=reportType,proto3,enum=ExposureKey_ReportType" json:"reportType,omitempty"` DaysSinceOnsetOfSymptoms int32 `protobuf:"zigzag32,6,opt,name=daysSinceOnsetOfSymptoms,proto3" json:"daysSinceOnsetOfSymptoms,omitempty"` // Valid values are -14 ... 14 HasSymptomOnset bool `protobuf:"varint,7,opt,name=hasSymptomOnset,proto3" json:"hasSymptomOnset,omitempty"` // Used to disambiguate between 0 and missing. Traveler bool `protobuf:"varint,8,opt,name=traveler,proto3" json:"traveler,omitempty"` Regions []string `protobuf:"bytes,9,rep,name=regions,proto3" json:"regions,omitempty"` // contains filtered or unexported fields }
func (*ExposureKey) Descriptor
deprecated
func (*ExposureKey) Descriptor() ([]byte, []int)
Deprecated: Use ExposureKey.ProtoReflect.Descriptor instead.
func (*ExposureKey) GetDaysSinceOnsetOfSymptoms ¶
func (x *ExposureKey) GetDaysSinceOnsetOfSymptoms() int32
func (*ExposureKey) GetExposureKey ¶
func (x *ExposureKey) GetExposureKey() []byte
func (*ExposureKey) GetHasSymptomOnset ¶
func (x *ExposureKey) GetHasSymptomOnset() bool
func (*ExposureKey) GetIntervalCount ¶
func (x *ExposureKey) GetIntervalCount() int32
func (*ExposureKey) GetIntervalNumber ¶
func (x *ExposureKey) GetIntervalNumber() int32
func (*ExposureKey) GetRegions ¶
func (x *ExposureKey) GetRegions() []string
func (*ExposureKey) GetReportType ¶
func (x *ExposureKey) GetReportType() ExposureKey_ReportType
func (*ExposureKey) GetTransmissionRisk ¶
func (x *ExposureKey) GetTransmissionRisk() int32
func (*ExposureKey) GetTraveler ¶
func (x *ExposureKey) GetTraveler() bool
func (*ExposureKey) ProtoMessage ¶
func (*ExposureKey) ProtoMessage()
func (*ExposureKey) ProtoReflect ¶
func (x *ExposureKey) ProtoReflect() protoreflect.Message
func (*ExposureKey) Reset ¶
func (x *ExposureKey) Reset()
func (*ExposureKey) String ¶
func (x *ExposureKey) String() string
type ExposureKey_ReportType ¶
type ExposureKey_ReportType int32
const ( ExposureKey_UNKNOWN ExposureKey_ReportType = 0 // Not used by this protocol ExposureKey_CONFIRMED_TEST ExposureKey_ReportType = 1 ExposureKey_CONFIRMED_CLINICAL_DIAGNOSIS ExposureKey_ReportType = 2 ExposureKey_SELF_REPORT ExposureKey_ReportType = 3 // Not used by this protocol ExposureKey_RECURSIVE ExposureKey_ReportType = 4 // Not used by this protocol ExposureKey_REVOKED ExposureKey_ReportType = 5 // Used to revoke a key, never returned by client API. )
func (ExposureKey_ReportType) Descriptor ¶
func (ExposureKey_ReportType) Descriptor() protoreflect.EnumDescriptor
func (ExposureKey_ReportType) Enum ¶
func (x ExposureKey_ReportType) Enum() *ExposureKey_ReportType
func (ExposureKey_ReportType) EnumDescriptor
deprecated
func (ExposureKey_ReportType) EnumDescriptor() ([]byte, []int)
Deprecated: Use ExposureKey_ReportType.Descriptor instead.
func (ExposureKey_ReportType) Number ¶
func (x ExposureKey_ReportType) Number() protoreflect.EnumNumber
func (ExposureKey_ReportType) String ¶
func (x ExposureKey_ReportType) String() string
func (ExposureKey_ReportType) Type ¶
func (ExposureKey_ReportType) Type() protoreflect.EnumType
type FederationClient ¶
type FederationClient interface {
Fetch(ctx context.Context, in *FederationFetchRequest, opts ...grpc.CallOption) (*FederationFetchResponse, error)
}
FederationClient is the client API for Federation service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewFederationClient ¶
func NewFederationClient(cc grpc.ClientConnInterface) FederationClient
type FederationFetchRequest ¶
type FederationFetchRequest struct { IncludeRegions []string `protobuf:"bytes,1,rep,name=includeRegions,proto3" json:"includeRegions,omitempty"` ExcludeRegions []string `protobuf:"bytes,2,rep,name=excludeRegions,proto3" json:"excludeRegions,omitempty"` OnlyTravelers bool `protobuf:"varint,3,opt,name=onlyTravelers,proto3" json:"onlyTravelers,omitempty"` OnlyLocalProvenance bool `protobuf:"varint,4,opt,name=onlyLocalProvenance,proto3" json:"onlyLocalProvenance,omitempty"` // Max overall exposure keys to fetch. // Upper limit is 500. MaxExposureKeys uint32 `protobuf:"varint,5,opt,name=maxExposureKeys,proto3" json:"maxExposureKeys,omitempty"` // region, includeTravelers, onlyTravelers must be stable to send a fetchToken. // initial query should send an empty fetch state token. State *FetchState `protobuf:"bytes,6,opt,name=state,proto3" json:"state,omitempty"` // contains filtered or unexported fields }
func (*FederationFetchRequest) Descriptor
deprecated
func (*FederationFetchRequest) Descriptor() ([]byte, []int)
Deprecated: Use FederationFetchRequest.ProtoReflect.Descriptor instead.
func (*FederationFetchRequest) GetExcludeRegions ¶
func (x *FederationFetchRequest) GetExcludeRegions() []string
func (*FederationFetchRequest) GetIncludeRegions ¶
func (x *FederationFetchRequest) GetIncludeRegions() []string
func (*FederationFetchRequest) GetMaxExposureKeys ¶
func (x *FederationFetchRequest) GetMaxExposureKeys() uint32
func (*FederationFetchRequest) GetOnlyLocalProvenance ¶
func (x *FederationFetchRequest) GetOnlyLocalProvenance() bool
func (*FederationFetchRequest) GetOnlyTravelers ¶
func (x *FederationFetchRequest) GetOnlyTravelers() bool
func (*FederationFetchRequest) GetState ¶
func (x *FederationFetchRequest) GetState() *FetchState
func (*FederationFetchRequest) ProtoMessage ¶
func (*FederationFetchRequest) ProtoMessage()
func (*FederationFetchRequest) ProtoReflect ¶
func (x *FederationFetchRequest) ProtoReflect() protoreflect.Message
func (*FederationFetchRequest) Reset ¶
func (x *FederationFetchRequest) Reset()
func (*FederationFetchRequest) String ¶
func (x *FederationFetchRequest) String() string
type FederationFetchResponse ¶
type FederationFetchResponse struct { Keys []*ExposureKey `protobuf:"bytes,1,rep,name=keys,proto3" json:"keys,omitempty"` RevisedKeys []*ExposureKey `protobuf:"bytes,2,rep,name=revisedKeys,proto3" json:"revisedKeys,omitempty"` PartialResponse bool `protobuf:"varint,3,opt,name=partialResponse,proto3" json:"partialResponse,omitempty"` // required NextFetchState *FetchState `protobuf:"bytes,4,opt,name=nextFetchState,proto3" json:"nextFetchState,omitempty"` // nextFetchState allows the query to be continued. // contains filtered or unexported fields }
func (*FederationFetchResponse) Descriptor
deprecated
func (*FederationFetchResponse) Descriptor() ([]byte, []int)
Deprecated: Use FederationFetchResponse.ProtoReflect.Descriptor instead.
func (*FederationFetchResponse) GetKeys ¶
func (x *FederationFetchResponse) GetKeys() []*ExposureKey
func (*FederationFetchResponse) GetNextFetchState ¶
func (x *FederationFetchResponse) GetNextFetchState() *FetchState
func (*FederationFetchResponse) GetPartialResponse ¶
func (x *FederationFetchResponse) GetPartialResponse() bool
func (*FederationFetchResponse) GetRevisedKeys ¶
func (x *FederationFetchResponse) GetRevisedKeys() []*ExposureKey
func (*FederationFetchResponse) ProtoMessage ¶
func (*FederationFetchResponse) ProtoMessage()
func (*FederationFetchResponse) ProtoReflect ¶
func (x *FederationFetchResponse) ProtoReflect() protoreflect.Message
func (*FederationFetchResponse) Reset ¶
func (x *FederationFetchResponse) Reset()
func (*FederationFetchResponse) String ¶
func (x *FederationFetchResponse) String() string
type FederationServer ¶
type FederationServer interface {
Fetch(context.Context, *FederationFetchRequest) (*FederationFetchResponse, error)
}
FederationServer is the server API for Federation service.
type FetchState ¶
type FetchState struct { KeyCursor *Cursor `protobuf:"bytes,1,opt,name=keyCursor,proto3" json:"keyCursor,omitempty"` RevisedKeyCursor *Cursor `protobuf:"bytes,2,opt,name=revisedKeyCursor,proto3" json:"revisedKeyCursor,omitempty"` // contains filtered or unexported fields }
func (*FetchState) Descriptor
deprecated
func (*FetchState) Descriptor() ([]byte, []int)
Deprecated: Use FetchState.ProtoReflect.Descriptor instead.
func (*FetchState) GetKeyCursor ¶
func (x *FetchState) GetKeyCursor() *Cursor
func (*FetchState) GetRevisedKeyCursor ¶
func (x *FetchState) GetRevisedKeyCursor() *Cursor
func (*FetchState) ProtoMessage ¶
func (*FetchState) ProtoMessage()
func (*FetchState) ProtoReflect ¶
func (x *FetchState) ProtoReflect() protoreflect.Message
func (*FetchState) Reset ¶
func (x *FetchState) Reset()
func (*FetchState) String ¶
func (x *FetchState) String() string
type UnimplementedFederationServer ¶
type UnimplementedFederationServer struct { }
UnimplementedFederationServer can be embedded to have forward compatible implementations.
func (*UnimplementedFederationServer) Fetch ¶
func (*UnimplementedFederationServer) Fetch(context.Context, *FederationFetchRequest) (*FederationFetchResponse, error)