keytransparency_proto

package
v0.0.0-...-9be813a Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2018 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Overview

Package keytransparency_proto is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Package keytransparency_proto is a generated protocol buffer package.

Key Transparency

The Key Transparency API consists of a map of user names to public keys. Each user name also has a history of public keys that have been associated with it.

It is generated from these files:

v1/keytransparency_proto/keytransparency.proto
v1/keytransparency_proto/admin.proto

It has these top-level messages:

Committed
EntryUpdate
Entry
MutationProof
MapperMetadata
UserProfile
GetEntryRequest
GetEntryResponse
ListEntryHistoryRequest
ListEntryHistoryResponse
UpdateEntryRequest
UpdateEntryResponse
GetEpochRequest
Epoch
ListMutationsRequest
ListMutationsResponse
Domain
ListDomainsRequest
ListDomainsResponse
GetDomainRequest
CreateDomainRequest
DeleteDomainRequest
UndeleteDomainRequest

Package keytransparency_proto is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterKeyTransparencyAdminHandler

func RegisterKeyTransparencyAdminHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterKeyTransparencyAdminHandler registers the http handlers for service KeyTransparencyAdmin to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterKeyTransparencyAdminHandlerClient

func RegisterKeyTransparencyAdminHandlerClient(ctx context.Context, mux *runtime.ServeMux, client KeyTransparencyAdminClient) error

RegisterKeyTransparencyAdminHandler registers the http handlers for service KeyTransparencyAdmin to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "KeyTransparencyAdminClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "KeyTransparencyAdminClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "KeyTransparencyAdminClient" to call the correct interceptors.

func RegisterKeyTransparencyAdminHandlerFromEndpoint

func RegisterKeyTransparencyAdminHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterKeyTransparencyAdminHandlerFromEndpoint is same as RegisterKeyTransparencyAdminHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterKeyTransparencyAdminServer

func RegisterKeyTransparencyAdminServer(s *grpc.Server, srv KeyTransparencyAdminServer)

func RegisterKeyTransparencyHandler

func RegisterKeyTransparencyHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterKeyTransparencyHandler registers the http handlers for service KeyTransparency to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterKeyTransparencyHandlerClient

func RegisterKeyTransparencyHandlerClient(ctx context.Context, mux *runtime.ServeMux, client KeyTransparencyClient) error

RegisterKeyTransparencyHandler registers the http handlers for service KeyTransparency to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "KeyTransparencyClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "KeyTransparencyClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "KeyTransparencyClient" to call the correct interceptors.

func RegisterKeyTransparencyHandlerFromEndpoint

func RegisterKeyTransparencyHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterKeyTransparencyHandlerFromEndpoint is same as RegisterKeyTransparencyHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterKeyTransparencyServer

func RegisterKeyTransparencyServer(s *grpc.Server, srv KeyTransparencyServer)

Types

type Committed

type Committed struct {
	// key is the 16 byte random commitment key.
	Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	// data is the data being committed to.
	Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
}

Committed represents the data committed to in a cryptographic commitment. commitment = HMAC_SHA512_256(key, data)

func (*Committed) Descriptor

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

func (*Committed) GetData

func (m *Committed) GetData() []byte

func (*Committed) GetKey

func (m *Committed) GetKey() []byte

func (*Committed) ProtoMessage

func (*Committed) ProtoMessage()

func (*Committed) Reset

func (m *Committed) Reset()

func (*Committed) String

func (m *Committed) String() string

type CreateDomainRequest

type CreateDomainRequest struct {
	DomainId    string                     `protobuf:"bytes,1,opt,name=domain_id,json=domainId" json:"domain_id,omitempty"`
	MinInterval *google_protobuf2.Duration `protobuf:"bytes,2,opt,name=min_interval,json=minInterval" json:"min_interval,omitempty"`
	MaxInterval *google_protobuf2.Duration `protobuf:"bytes,3,opt,name=max_interval,json=maxInterval" json:"max_interval,omitempty"`
}

CreateDomainRequest creates a new domain

func (*CreateDomainRequest) Descriptor

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

func (*CreateDomainRequest) GetDomainId

func (m *CreateDomainRequest) GetDomainId() string

func (*CreateDomainRequest) GetMaxInterval

func (m *CreateDomainRequest) GetMaxInterval() *google_protobuf2.Duration

func (*CreateDomainRequest) GetMinInterval

func (m *CreateDomainRequest) GetMinInterval() *google_protobuf2.Duration

func (*CreateDomainRequest) ProtoMessage

func (*CreateDomainRequest) ProtoMessage()

func (*CreateDomainRequest) Reset

func (m *CreateDomainRequest) Reset()

func (*CreateDomainRequest) String

func (m *CreateDomainRequest) String() string

type DeleteDomainRequest

type DeleteDomainRequest struct {
	DomainId string `protobuf:"bytes,1,opt,name=domain_id,json=domainId" json:"domain_id,omitempty"`
}

DeleteDomainRequest deletes a domain

func (*DeleteDomainRequest) Descriptor

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

func (*DeleteDomainRequest) GetDomainId

func (m *DeleteDomainRequest) GetDomainId() string

func (*DeleteDomainRequest) ProtoMessage

func (*DeleteDomainRequest) ProtoMessage()

func (*DeleteDomainRequest) Reset

func (m *DeleteDomainRequest) Reset()

func (*DeleteDomainRequest) String

func (m *DeleteDomainRequest) String() string

type Domain

type Domain struct {
	// DomainId can be any URL safe string.
	DomainId string `protobuf:"bytes,1,opt,name=domain_id,json=domainId" json:"domain_id,omitempty"`
	// Log contains the Log-Tree's info.
	Log *trillian.Tree `protobuf:"bytes,2,opt,name=log" json:"log,omitempty"`
	// Map contains the Map-Tree's info.
	Map *trillian.Tree `protobuf:"bytes,3,opt,name=map" json:"map,omitempty"`
	// Vrf contains the VRF public key.
	Vrf *keyspb.PublicKey `protobuf:"bytes,4,opt,name=vrf" json:"vrf,omitempty"`
	// min_interval is the minimum time between epochs.
	MinInterval *google_protobuf2.Duration `protobuf:"bytes,5,opt,name=min_interval,json=minInterval" json:"min_interval,omitempty"`
	// max_interval is the maximum time between epochs.
	MaxInterval *google_protobuf2.Duration `protobuf:"bytes,6,opt,name=max_interval,json=maxInterval" json:"max_interval,omitempty"`
	// Deleted indicates whether the domain has been marked as deleted.
	// By its presence in a response, this domain has not been garbage collected.
	Deleted bool `protobuf:"varint,7,opt,name=deleted" json:"deleted,omitempty"`
}

Domain contains information on a single domain

func (*Domain) Descriptor

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

func (*Domain) GetDeleted

func (m *Domain) GetDeleted() bool

func (*Domain) GetDomainId

func (m *Domain) GetDomainId() string

func (*Domain) GetLog

func (m *Domain) GetLog() *trillian.Tree

func (*Domain) GetMap

func (m *Domain) GetMap() *trillian.Tree

func (*Domain) GetMaxInterval

func (m *Domain) GetMaxInterval() *google_protobuf2.Duration

func (*Domain) GetMinInterval

func (m *Domain) GetMinInterval() *google_protobuf2.Duration

func (*Domain) GetVrf

func (m *Domain) GetVrf() *keyspb.PublicKey

func (*Domain) ProtoMessage

func (*Domain) ProtoMessage()

func (*Domain) Reset

func (m *Domain) Reset()

func (*Domain) String

func (m *Domain) String() string

type Entry

type Entry struct {
	// index is the location of this leaf in the sparse merkle tree.
	Index []byte `protobuf:"bytes,3,opt,name=index,proto3" json:"index,omitempty"`
	// commitment is a cryptographic commitment to arbitrary data.
	Commitment []byte `protobuf:"bytes,6,opt,name=commitment,proto3" json:"commitment,omitempty"`
	// authorized_keys is the set of keys allowed to sign updates for this entry.
	AuthorizedKeys []*keyspb.PublicKey `protobuf:"bytes,7,rep,name=authorized_keys,json=authorizedKeys" json:"authorized_keys,omitempty"`
	// previous contains the hash of the previous entry that this mutation is
	// modifying creating a hash chain of all mutations. The hash used is
	// CommonJSON in "github.com/benlaurie/objecthash/go/objecthash".
	Previous []byte `protobuf:"bytes,8,opt,name=previous,proto3" json:"previous,omitempty"`
	// signatures on key_value. Must be signed by keys from both previous and
	// current epochs. The first proves ownership of new epoch key, and the
	// second proves that the correct owner is making this change.
	Signatures map[string]*sigpb.DigitallySigned `` /* 140-byte string literal not displayed */
}

Entry is a signed change to a map entry. Entry contains a commitment to profile and a set of authorized update keys. Entry is placed in the verifiable map as leaf data.

func (*Entry) Descriptor

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

func (*Entry) GetAuthorizedKeys

func (m *Entry) GetAuthorizedKeys() []*keyspb.PublicKey

func (*Entry) GetCommitment

func (m *Entry) GetCommitment() []byte

func (*Entry) GetIndex

func (m *Entry) GetIndex() []byte

func (*Entry) GetPrevious

func (m *Entry) GetPrevious() []byte

func (*Entry) GetSignatures

func (m *Entry) GetSignatures() map[string]*sigpb.DigitallySigned

func (*Entry) ProtoMessage

func (*Entry) ProtoMessage()

func (*Entry) Reset

func (m *Entry) Reset()

func (*Entry) String

func (m *Entry) String() string

type EntryUpdate

type EntryUpdate struct {
	// mutation authorizes the change to entry.
	Mutation *Entry `protobuf:"bytes,2,opt,name=mutation" json:"mutation,omitempty"`
	// commitment contains the data committed to in update.commitment.
	Committed *Committed `protobuf:"bytes,3,opt,name=committed" json:"committed,omitempty"`
}

EntryUpdate contains the user entry update(s).

func (*EntryUpdate) Descriptor

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

func (*EntryUpdate) GetCommitted

func (m *EntryUpdate) GetCommitted() *Committed

func (*EntryUpdate) GetMutation

func (m *EntryUpdate) GetMutation() *Entry

func (*EntryUpdate) ProtoMessage

func (*EntryUpdate) ProtoMessage()

func (*EntryUpdate) Reset

func (m *EntryUpdate) Reset()

func (*EntryUpdate) String

func (m *EntryUpdate) String() string

type Epoch

type Epoch struct {
	// domain_id is the domain identifier.
	DomainId string `protobuf:"bytes,1,opt,name=domain_id,json=domainId" json:"domain_id,omitempty"`
	// smr contains the signed map root for the sparse Merkle Tree.
	Smr *trillian.SignedMapRoot `protobuf:"bytes,2,opt,name=smr" json:"smr,omitempty"`
	// log_root is the latest globally consistent log root.
	LogRoot *trillian.SignedLogRoot `protobuf:"bytes,3,opt,name=log_root,json=logRoot" json:"log_root,omitempty"`
	// log_consistency proves that log_root is consistent with previously seen roots.
	LogConsistency [][]byte `protobuf:"bytes,4,rep,name=log_consistency,json=logConsistency,proto3" json:"log_consistency,omitempty"`
	// log_inclusion proves that smr is part of log_root at index=srm.MapRevision.
	LogInclusion [][]byte `protobuf:"bytes,5,rep,name=log_inclusion,json=logInclusion,proto3" json:"log_inclusion,omitempty"`
}

Epoch represents a snapshot of the entire key directory and a diff of what changed between this revision and the previous revision.

func (*Epoch) Descriptor

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

func (*Epoch) GetDomainId

func (m *Epoch) GetDomainId() string

func (*Epoch) GetLogConsistency

func (m *Epoch) GetLogConsistency() [][]byte

func (*Epoch) GetLogInclusion

func (m *Epoch) GetLogInclusion() [][]byte

func (*Epoch) GetLogRoot

func (m *Epoch) GetLogRoot() *trillian.SignedLogRoot

func (*Epoch) GetSmr

func (m *Epoch) GetSmr() *trillian.SignedMapRoot

func (*Epoch) ProtoMessage

func (*Epoch) ProtoMessage()

func (*Epoch) Reset

func (m *Epoch) Reset()

func (*Epoch) String

func (m *Epoch) String() string

type GetDomainRequest

type GetDomainRequest struct {
	DomainId string `protobuf:"bytes,1,opt,name=domain_id,json=domainId" json:"domain_id,omitempty"`
	// showDeleted requests domains that have been marked for deletion
	// but have not been garbage collected.
	ShowDeleted bool `protobuf:"varint,2,opt,name=show_deleted,json=showDeleted" json:"show_deleted,omitempty"`
}

GetDomainRequest specifies the domain to retrieve information for.

func (*GetDomainRequest) Descriptor

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

func (*GetDomainRequest) GetDomainId

func (m *GetDomainRequest) GetDomainId() string

func (*GetDomainRequest) GetShowDeleted

func (m *GetDomainRequest) GetShowDeleted() bool

func (*GetDomainRequest) ProtoMessage

func (*GetDomainRequest) ProtoMessage()

func (*GetDomainRequest) Reset

func (m *GetDomainRequest) Reset()

func (*GetDomainRequest) String

func (m *GetDomainRequest) String() string

type GetEntryRequest

type GetEntryRequest struct {
	// domain_id identifies the domain in which the user and application live.
	DomainId string `protobuf:"bytes,4,opt,name=domain_id,json=domainId" json:"domain_id,omitempty"`
	// user_id is the user identifier. Most commonly an email address.
	UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId" json:"user_id,omitempty"`
	// app_id is the identifier for the application.
	AppId string `protobuf:"bytes,2,opt,name=app_id,json=appId" json:"app_id,omitempty"`
	// first_tree_size is the tree_size of the currently trusted log root.
	// Omitting this field will omit the log consistency proof from the response.
	FirstTreeSize int64 `protobuf:"varint,3,opt,name=first_tree_size,json=firstTreeSize" json:"first_tree_size,omitempty"`
}

GetEntryRequest for a user object.

func (*GetEntryRequest) Descriptor

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

func (*GetEntryRequest) GetAppId

func (m *GetEntryRequest) GetAppId() string

func (*GetEntryRequest) GetDomainId

func (m *GetEntryRequest) GetDomainId() string

func (*GetEntryRequest) GetFirstTreeSize

func (m *GetEntryRequest) GetFirstTreeSize() int64

func (*GetEntryRequest) GetUserId

func (m *GetEntryRequest) GetUserId() string

func (*GetEntryRequest) ProtoMessage

func (*GetEntryRequest) ProtoMessage()

func (*GetEntryRequest) Reset

func (m *GetEntryRequest) Reset()

func (*GetEntryRequest) String

func (m *GetEntryRequest) String() string

type GetEntryResponse

type GetEntryResponse struct {
	// vrf_proof is the proof for VRF on user_id.
	VrfProof []byte `protobuf:"bytes,1,opt,name=vrf_proof,json=vrfProof,proto3" json:"vrf_proof,omitempty"`
	// committed contains the profile for this account and connects the data
	// in profile to the commitment in leaf_proof.
	Committed *Committed `protobuf:"bytes,2,opt,name=committed" json:"committed,omitempty"`
	// leaf_proof contains an Entry and an inclusion proof in the sparse Merkle
	// Tree.
	LeafProof *trillian1.MapLeafInclusion `protobuf:"bytes,3,opt,name=leaf_proof,json=leafProof" json:"leaf_proof,omitempty"`
	// smr contains the signed map head for the sparse Merkle Tree.
	// smr is also stored in the append only log.
	Smr *trillian.SignedMapRoot `protobuf:"bytes,4,opt,name=smr" json:"smr,omitempty"`
	// log_root is the latest globally consistent log root.
	// TODO: gossip the log root to verify global consistency.
	LogRoot *trillian.SignedLogRoot `protobuf:"bytes,5,opt,name=log_root,json=logRoot" json:"log_root,omitempty"`
	// log_consistency proves that log_root is consistent with previously seen roots.
	LogConsistency [][]byte `protobuf:"bytes,6,rep,name=log_consistency,json=logConsistency,proto3" json:"log_consistency,omitempty"`
	// log_inclusion proves that smr is part of log_root at index=srm.MapRevision.
	LogInclusion [][]byte `protobuf:"bytes,7,rep,name=log_inclusion,json=logInclusion,proto3" json:"log_inclusion,omitempty"`
}

GetEntryResponse returns a requested user entry.

func (*GetEntryResponse) Descriptor

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

func (*GetEntryResponse) GetCommitted

func (m *GetEntryResponse) GetCommitted() *Committed

func (*GetEntryResponse) GetLeafProof

func (m *GetEntryResponse) GetLeafProof() *trillian1.MapLeafInclusion

func (*GetEntryResponse) GetLogConsistency

func (m *GetEntryResponse) GetLogConsistency() [][]byte

func (*GetEntryResponse) GetLogInclusion

func (m *GetEntryResponse) GetLogInclusion() [][]byte

func (*GetEntryResponse) GetLogRoot

func (m *GetEntryResponse) GetLogRoot() *trillian.SignedLogRoot

func (*GetEntryResponse) GetSmr

func (*GetEntryResponse) GetVrfProof

func (m *GetEntryResponse) GetVrfProof() []byte

func (*GetEntryResponse) ProtoMessage

func (*GetEntryResponse) ProtoMessage()

func (*GetEntryResponse) Reset

func (m *GetEntryResponse) Reset()

func (*GetEntryResponse) String

func (m *GetEntryResponse) String() string

type GetEpochRequest

type GetEpochRequest struct {
	// domain_id is the domain for which epochs are being requested.
	DomainId string `protobuf:"bytes,5,opt,name=domain_id,json=domainId" json:"domain_id,omitempty"`
	// epoch specifies the epoch number in which mutations will be returned.
	Epoch int64 `protobuf:"varint,1,opt,name=epoch" json:"epoch,omitempty"`
	// first_tree_size is the tree_size of the currently trusted log root.
	// Omitting this field will omit the log consistency proof from the response.
	FirstTreeSize int64 `protobuf:"varint,2,opt,name=first_tree_size,json=firstTreeSize" json:"first_tree_size,omitempty"`
}

GetEpochRequest identifies a particular epoch.

func (*GetEpochRequest) Descriptor

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

func (*GetEpochRequest) GetDomainId

func (m *GetEpochRequest) GetDomainId() string

func (*GetEpochRequest) GetEpoch

func (m *GetEpochRequest) GetEpoch() int64

func (*GetEpochRequest) GetFirstTreeSize

func (m *GetEpochRequest) GetFirstTreeSize() int64

func (*GetEpochRequest) ProtoMessage

func (*GetEpochRequest) ProtoMessage()

func (*GetEpochRequest) Reset

func (m *GetEpochRequest) Reset()

func (*GetEpochRequest) String

func (m *GetEpochRequest) String() string

type KeyTransparencyAdminClient

type KeyTransparencyAdminClient interface {
	// ListDomains returns a list of all domains this Key Transparency server
	// operates on.
	ListDomains(ctx context.Context, in *ListDomainsRequest, opts ...grpc.CallOption) (*ListDomainsResponse, error)
	// GetDomain returns the confiuration information for a given domain.
	GetDomain(ctx context.Context, in *GetDomainRequest, opts ...grpc.CallOption) (*Domain, error)
	// CreateDomain creates a new Trillian log/map pair.  A unique domainId must
	// be provided.  To create a new domain with the same name as a previously
	// deleted domain, a user must wait X days until the domain is garbage
	// collected.
	CreateDomain(ctx context.Context, in *CreateDomainRequest, opts ...grpc.CallOption) (*Domain, error)
	// DeleteDomain marks a domain as deleted.  Domains will be garbage collected
	// after X days.
	DeleteDomain(ctx context.Context, in *DeleteDomainRequest, opts ...grpc.CallOption) (*google_protobuf4.Empty, error)
	// UndeleteDomain marks a previously deleted domain as active if it has not
	// already been garbage collected.
	UndeleteDomain(ctx context.Context, in *UndeleteDomainRequest, opts ...grpc.CallOption) (*google_protobuf4.Empty, error)
}

func NewKeyTransparencyAdminClient

func NewKeyTransparencyAdminClient(cc *grpc.ClientConn) KeyTransparencyAdminClient

type KeyTransparencyAdminServer

type KeyTransparencyAdminServer interface {
	// ListDomains returns a list of all domains this Key Transparency server
	// operates on.
	ListDomains(context.Context, *ListDomainsRequest) (*ListDomainsResponse, error)
	// GetDomain returns the confiuration information for a given domain.
	GetDomain(context.Context, *GetDomainRequest) (*Domain, error)
	// CreateDomain creates a new Trillian log/map pair.  A unique domainId must
	// be provided.  To create a new domain with the same name as a previously
	// deleted domain, a user must wait X days until the domain is garbage
	// collected.
	CreateDomain(context.Context, *CreateDomainRequest) (*Domain, error)
	// DeleteDomain marks a domain as deleted.  Domains will be garbage collected
	// after X days.
	DeleteDomain(context.Context, *DeleteDomainRequest) (*google_protobuf4.Empty, error)
	// UndeleteDomain marks a previously deleted domain as active if it has not
	// already been garbage collected.
	UndeleteDomain(context.Context, *UndeleteDomainRequest) (*google_protobuf4.Empty, error)
}

type KeyTransparencyClient

type KeyTransparencyClient interface {
	// GetDomain returns the information needed to verify the specified domain.
	GetDomain(ctx context.Context, in *GetDomainRequest, opts ...grpc.CallOption) (*Domain, error)
	// GetEpoch returns a list of mutations between an epoch and its predecessor.
	//
	// Returns a list of mutations and their inclusion proofs along with the epoch
	// signed map root.
	GetEpoch(ctx context.Context, in *GetEpochRequest, opts ...grpc.CallOption) (*Epoch, error)
	// GetEpochStream streams new epochs as they are created.
	//
	// Returns a list of mutations and their inclusion proofs along with the epoch
	// signed map root.
	GetEpochStream(ctx context.Context, in *GetEpochRequest, opts ...grpc.CallOption) (KeyTransparency_GetEpochStreamClient, error)
	// ListMutations returns a list of mutations in a specific epoch.
	ListMutations(ctx context.Context, in *ListMutationsRequest, opts ...grpc.CallOption) (*ListMutationsResponse, error)
	// ListMutationsStream is a streaming list of mutations in a specific epoch.
	ListMutationsStream(ctx context.Context, in *ListMutationsRequest, opts ...grpc.CallOption) (KeyTransparency_ListMutationsStreamClient, error)
	// GetEntry returns a user's entry in the Merkle Tree.
	//
	// Entries contain signed commitments to a profile, which is also returned.
	// TODO(gbelvin): Replace with GetUser
	GetEntry(ctx context.Context, in *GetEntryRequest, opts ...grpc.CallOption) (*GetEntryResponse, error)
	// ListEntryHistory returns a list of historic GetEntry values.
	//
	// Clients verify their account history by observing correct values for their
	// account over time.
	ListEntryHistory(ctx context.Context, in *ListEntryHistoryRequest, opts ...grpc.CallOption) (*ListEntryHistoryResponse, error)
	// UpdateEntry updates a user's profile.
	//
	// Returns the current user profile.
	// Clients must retry until this function returns a proof containing the desired value.
	UpdateEntry(ctx context.Context, in *UpdateEntryRequest, opts ...grpc.CallOption) (*UpdateEntryResponse, error)
}

func NewKeyTransparencyClient

func NewKeyTransparencyClient(cc *grpc.ClientConn) KeyTransparencyClient

type KeyTransparencyServer

type KeyTransparencyServer interface {
	// GetDomain returns the information needed to verify the specified domain.
	GetDomain(context.Context, *GetDomainRequest) (*Domain, error)
	// GetEpoch returns a list of mutations between an epoch and its predecessor.
	//
	// Returns a list of mutations and their inclusion proofs along with the epoch
	// signed map root.
	GetEpoch(context.Context, *GetEpochRequest) (*Epoch, error)
	// GetEpochStream streams new epochs as they are created.
	//
	// Returns a list of mutations and their inclusion proofs along with the epoch
	// signed map root.
	GetEpochStream(*GetEpochRequest, KeyTransparency_GetEpochStreamServer) error
	// ListMutations returns a list of mutations in a specific epoch.
	ListMutations(context.Context, *ListMutationsRequest) (*ListMutationsResponse, error)
	// ListMutationsStream is a streaming list of mutations in a specific epoch.
	ListMutationsStream(*ListMutationsRequest, KeyTransparency_ListMutationsStreamServer) error
	// GetEntry returns a user's entry in the Merkle Tree.
	//
	// Entries contain signed commitments to a profile, which is also returned.
	// TODO(gbelvin): Replace with GetUser
	GetEntry(context.Context, *GetEntryRequest) (*GetEntryResponse, error)
	// ListEntryHistory returns a list of historic GetEntry values.
	//
	// Clients verify their account history by observing correct values for their
	// account over time.
	ListEntryHistory(context.Context, *ListEntryHistoryRequest) (*ListEntryHistoryResponse, error)
	// UpdateEntry updates a user's profile.
	//
	// Returns the current user profile.
	// Clients must retry until this function returns a proof containing the desired value.
	UpdateEntry(context.Context, *UpdateEntryRequest) (*UpdateEntryResponse, error)
}

type KeyTransparency_GetEpochStreamClient

type KeyTransparency_GetEpochStreamClient interface {
	Recv() (*Epoch, error)
	grpc.ClientStream
}

type KeyTransparency_GetEpochStreamServer

type KeyTransparency_GetEpochStreamServer interface {
	Send(*Epoch) error
	grpc.ServerStream
}

type KeyTransparency_ListMutationsStreamClient

type KeyTransparency_ListMutationsStreamClient interface {
	Recv() (*MutationProof, error)
	grpc.ClientStream
}

type KeyTransparency_ListMutationsStreamServer

type KeyTransparency_ListMutationsStreamServer interface {
	Send(*MutationProof) error
	grpc.ServerStream
}

type ListDomainsRequest

type ListDomainsRequest struct {
	// showDeleted requests domains that have been marked for deletion
	// but have not been garbage collected.
	ShowDeleted bool `protobuf:"varint,1,opt,name=show_deleted,json=showDeleted" json:"show_deleted,omitempty"`
}

ListDomains request. No pagination options are provided.

func (*ListDomainsRequest) Descriptor

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

func (*ListDomainsRequest) GetShowDeleted

func (m *ListDomainsRequest) GetShowDeleted() bool

func (*ListDomainsRequest) ProtoMessage

func (*ListDomainsRequest) ProtoMessage()

func (*ListDomainsRequest) Reset

func (m *ListDomainsRequest) Reset()

func (*ListDomainsRequest) String

func (m *ListDomainsRequest) String() string

type ListDomainsResponse

type ListDomainsResponse struct {
	Domains []*Domain `protobuf:"bytes,1,rep,name=domains" json:"domains,omitempty"`
}

ListDomains response contains domains.

func (*ListDomainsResponse) Descriptor

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

func (*ListDomainsResponse) GetDomains

func (m *ListDomainsResponse) GetDomains() []*Domain

func (*ListDomainsResponse) ProtoMessage

func (*ListDomainsResponse) ProtoMessage()

func (*ListDomainsResponse) Reset

func (m *ListDomainsResponse) Reset()

func (*ListDomainsResponse) String

func (m *ListDomainsResponse) String() string

type ListEntryHistoryRequest

type ListEntryHistoryRequest struct {
	// domain_id identifies the domain in which the user and application live.
	DomainId string `protobuf:"bytes,6,opt,name=domain_id,json=domainId" json:"domain_id,omitempty"`
	// user_id is the user identifier.
	UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId" json:"user_id,omitempty"`
	// start is the starting epoch.
	Start int64 `protobuf:"varint,2,opt,name=start" json:"start,omitempty"`
	// page_size is the maximum number of entries to return.
	PageSize int32 `protobuf:"varint,3,opt,name=page_size,json=pageSize" json:"page_size,omitempty"`
	// app_id is the identifier for the application.
	AppId string `protobuf:"bytes,4,opt,name=app_id,json=appId" json:"app_id,omitempty"`
	// first_tree_size is the tree_size of the currently trusted log root.
	// Omitting this field will omit the log consistency proof from the response.
	FirstTreeSize int64 `protobuf:"varint,5,opt,name=first_tree_size,json=firstTreeSize" json:"first_tree_size,omitempty"`
}

ListEntryHistoryRequest gets a list of historical keys for a user.

func (*ListEntryHistoryRequest) Descriptor

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

func (*ListEntryHistoryRequest) GetAppId

func (m *ListEntryHistoryRequest) GetAppId() string

func (*ListEntryHistoryRequest) GetDomainId

func (m *ListEntryHistoryRequest) GetDomainId() string

func (*ListEntryHistoryRequest) GetFirstTreeSize

func (m *ListEntryHistoryRequest) GetFirstTreeSize() int64

func (*ListEntryHistoryRequest) GetPageSize

func (m *ListEntryHistoryRequest) GetPageSize() int32

func (*ListEntryHistoryRequest) GetStart

func (m *ListEntryHistoryRequest) GetStart() int64

func (*ListEntryHistoryRequest) GetUserId

func (m *ListEntryHistoryRequest) GetUserId() string

func (*ListEntryHistoryRequest) ProtoMessage

func (*ListEntryHistoryRequest) ProtoMessage()

func (*ListEntryHistoryRequest) Reset

func (m *ListEntryHistoryRequest) Reset()

func (*ListEntryHistoryRequest) String

func (m *ListEntryHistoryRequest) String() string

type ListEntryHistoryResponse

type ListEntryHistoryResponse struct {
	// values represents the list of keys this user_id has contained over time.
	Values []*GetEntryResponse `protobuf:"bytes,1,rep,name=values" json:"values,omitempty"`
	// next_start is the next page token to query for pagination.
	// next_start is 0 when there are no more results to fetch.
	NextStart int64 `protobuf:"varint,2,opt,name=next_start,json=nextStart" json:"next_start,omitempty"`
}

ListEntryHistoryResponse requests a paginated history of keys for a user.

func (*ListEntryHistoryResponse) Descriptor

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

func (*ListEntryHistoryResponse) GetNextStart

func (m *ListEntryHistoryResponse) GetNextStart() int64

func (*ListEntryHistoryResponse) GetValues

func (m *ListEntryHistoryResponse) GetValues() []*GetEntryResponse

func (*ListEntryHistoryResponse) ProtoMessage

func (*ListEntryHistoryResponse) ProtoMessage()

func (*ListEntryHistoryResponse) Reset

func (m *ListEntryHistoryResponse) Reset()

func (*ListEntryHistoryResponse) String

func (m *ListEntryHistoryResponse) String() string

type ListMutationsRequest

type ListMutationsRequest struct {
	// domain_id is the domain identifier.
	DomainId string `protobuf:"bytes,5,opt,name=domain_id,json=domainId" json:"domain_id,omitempty"`
	// epoch specifies the epoch number.
	Epoch int64 `protobuf:"varint,1,opt,name=epoch" json:"epoch,omitempty"`
	// page_token defines the starting point for pagination.
	// To request the next page, pass next_page_token from the previous response.
	// To start at the beginning, simply omit page_token from the request.
	PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken" json:"page_token,omitempty"`
	// page_size is the maximum number of mutations to return in a single request.
	// The server may choose a smaller page_size than the one requested.
	PageSize int32 `protobuf:"varint,4,opt,name=page_size,json=pageSize" json:"page_size,omitempty"`
}

ListMutationsRequest requests the mutations that created a given epoch.

func (*ListMutationsRequest) Descriptor

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

func (*ListMutationsRequest) GetDomainId

func (m *ListMutationsRequest) GetDomainId() string

func (*ListMutationsRequest) GetEpoch

func (m *ListMutationsRequest) GetEpoch() int64

func (*ListMutationsRequest) GetPageSize

func (m *ListMutationsRequest) GetPageSize() int32

func (*ListMutationsRequest) GetPageToken

func (m *ListMutationsRequest) GetPageToken() string

func (*ListMutationsRequest) ProtoMessage

func (*ListMutationsRequest) ProtoMessage()

func (*ListMutationsRequest) Reset

func (m *ListMutationsRequest) Reset()

func (*ListMutationsRequest) String

func (m *ListMutationsRequest) String() string

type ListMutationsResponse

type ListMutationsResponse struct {
	// mutations contains the the mutation object and the leaf value it operated on.
	Mutations []*MutationProof `protobuf:"bytes,6,rep,name=mutations" json:"mutations,omitempty"`
	// next_page_token is the next page token to query for pagination.
	// An empty value means there are no more results to fetch.
	NextPageToken string `protobuf:"bytes,7,opt,name=next_page_token,json=nextPageToken" json:"next_page_token,omitempty"`
}

ListMutationsResponse contains the mutations that produced an epoch.

func (*ListMutationsResponse) Descriptor

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

func (*ListMutationsResponse) GetMutations

func (m *ListMutationsResponse) GetMutations() []*MutationProof

func (*ListMutationsResponse) GetNextPageToken

func (m *ListMutationsResponse) GetNextPageToken() string

func (*ListMutationsResponse) ProtoMessage

func (*ListMutationsResponse) ProtoMessage()

func (*ListMutationsResponse) Reset

func (m *ListMutationsResponse) Reset()

func (*ListMutationsResponse) String

func (m *ListMutationsResponse) String() string

type MapperMetadata

type MapperMetadata struct {
	HighestFullyCompletedSeq int64 `` /* 131-byte string literal not displayed */
}

MapperMetadata tracks the mutations that have been mapped so far. It is embedded in the Trillian SignedMapHead.

func (*MapperMetadata) Descriptor

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

func (*MapperMetadata) GetHighestFullyCompletedSeq

func (m *MapperMetadata) GetHighestFullyCompletedSeq() int64

func (*MapperMetadata) ProtoMessage

func (*MapperMetadata) ProtoMessage()

func (*MapperMetadata) Reset

func (m *MapperMetadata) Reset()

func (*MapperMetadata) String

func (m *MapperMetadata) String() string

type MutationProof

type MutationProof struct {
	// mutation contains the information needed to modify the old leaf.
	// The format of a mutation is specific to the particular Mutate function being used.
	Mutation *Entry `protobuf:"bytes,1,opt,name=mutation" json:"mutation,omitempty"`
	// leaf_proof contains the leaf and its inclusion proof for a particular map revision.
	LeafProof *trillian1.MapLeafInclusion `protobuf:"bytes,2,opt,name=leaf_proof,json=leafProof" json:"leaf_proof,omitempty"`
}

MutationProof contains the information necessary to compute the new leaf value. It contains a) the old leaf value with it's inclusion proof and b) the mutation. The new leaf value is computed via:

Mutate(leaf_value, mutation)

func (*MutationProof) Descriptor

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

func (*MutationProof) GetLeafProof

func (m *MutationProof) GetLeafProof() *trillian1.MapLeafInclusion

func (*MutationProof) GetMutation

func (m *MutationProof) GetMutation() *Entry

func (*MutationProof) ProtoMessage

func (*MutationProof) ProtoMessage()

func (*MutationProof) Reset

func (m *MutationProof) Reset()

func (*MutationProof) String

func (m *MutationProof) String() string

type UndeleteDomainRequest

type UndeleteDomainRequest struct {
	DomainId string `protobuf:"bytes,1,opt,name=domain_id,json=domainId" json:"domain_id,omitempty"`
}

UndeleteDomainRequest deletes a domain

func (*UndeleteDomainRequest) Descriptor

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

func (*UndeleteDomainRequest) GetDomainId

func (m *UndeleteDomainRequest) GetDomainId() string

func (*UndeleteDomainRequest) ProtoMessage

func (*UndeleteDomainRequest) ProtoMessage()

func (*UndeleteDomainRequest) Reset

func (m *UndeleteDomainRequest) Reset()

func (*UndeleteDomainRequest) String

func (m *UndeleteDomainRequest) String() string

type UpdateEntryRequest

type UpdateEntryRequest struct {
	// domain_id identifies the domain in which the user and application live.
	DomainId string `protobuf:"bytes,5,opt,name=domain_id,json=domainId" json:"domain_id,omitempty"`
	// user_id specifies the id for the user who's profile is being updated.
	UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId" json:"user_id,omitempty"`
	// app_id is the identifier for the application.
	AppId string `protobuf:"bytes,2,opt,name=app_id,json=appId" json:"app_id,omitempty"`
	// first_tree_size is the tree_size of the currently trusted log root.
	// Omitting this field will omit the log consistency proof from the response.
	FirstTreeSize int64 `protobuf:"varint,3,opt,name=first_tree_size,json=firstTreeSize" json:"first_tree_size,omitempty"`
	// entry_update contains the user submitted update.
	EntryUpdate *EntryUpdate `protobuf:"bytes,4,opt,name=entry_update,json=entryUpdate" json:"entry_update,omitempty"`
}

UpdateEntryRequest updates a user's profile.

func (*UpdateEntryRequest) Descriptor

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

func (*UpdateEntryRequest) GetAppId

func (m *UpdateEntryRequest) GetAppId() string

func (*UpdateEntryRequest) GetDomainId

func (m *UpdateEntryRequest) GetDomainId() string

func (*UpdateEntryRequest) GetEntryUpdate

func (m *UpdateEntryRequest) GetEntryUpdate() *EntryUpdate

func (*UpdateEntryRequest) GetFirstTreeSize

func (m *UpdateEntryRequest) GetFirstTreeSize() int64

func (*UpdateEntryRequest) GetUserId

func (m *UpdateEntryRequest) GetUserId() string

func (*UpdateEntryRequest) ProtoMessage

func (*UpdateEntryRequest) ProtoMessage()

func (*UpdateEntryRequest) Reset

func (m *UpdateEntryRequest) Reset()

func (*UpdateEntryRequest) String

func (m *UpdateEntryRequest) String() string

type UpdateEntryResponse

type UpdateEntryResponse struct {
	// proof contains a proof that the update has been included in the tree.
	Proof *GetEntryResponse `protobuf:"bytes,1,opt,name=proof" json:"proof,omitempty"`
}

UpdateEntryResponse contains a proof once the update has been included in the Merkle Tree.

func (*UpdateEntryResponse) Descriptor

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

func (*UpdateEntryResponse) GetProof

func (m *UpdateEntryResponse) GetProof() *GetEntryResponse

func (*UpdateEntryResponse) ProtoMessage

func (*UpdateEntryResponse) ProtoMessage()

func (*UpdateEntryResponse) Reset

func (m *UpdateEntryResponse) Reset()

func (*UpdateEntryResponse) String

func (m *UpdateEntryResponse) String() string

type UserProfile

type UserProfile struct {
	// data is the public key data for the user.
	Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
}

UserProfile is the data that a client would like to store on the server.

func (*UserProfile) Descriptor

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

func (*UserProfile) GetData

func (m *UserProfile) GetData() []byte

func (*UserProfile) ProtoMessage

func (*UserProfile) ProtoMessage()

func (*UserProfile) Reset

func (m *UserProfile) Reset()

func (*UserProfile) String

func (m *UserProfile) String() string

Jump to

Keyboard shortcuts

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