Documentation ¶
Index ¶
- type GerritChange
- type GerritChangeEdit
- type GerritClient
- func (gc *GerritClient) AbandonChange(ctx context.Context, in *gerrit.AbandonChangeRequest, opts ...grpc.CallOption) (*gerrit.ChangeInfo, error)
- func (gc *GerritClient) ChangeEditFileContent(ctx context.Context, in *gerrit.ChangeEditFileContentRequest, ...) (*empty.Empty, error)
- func (gc *GerritClient) ChangeEditPublish(ctx context.Context, in *gerrit.ChangeEditPublishRequest, ...) (*empty.Empty, error)
- func (gc *GerritClient) CreateChange(ctx context.Context, in *gerrit.CreateChangeRequest, opts ...grpc.CallOption) (*gerrit.ChangeInfo, error)
- func (gc *GerritClient) DeleteEditFileContent(ctx context.Context, in *gerrit.DeleteEditFileContentRequest, ...) (*empty.Empty, error)
- func (gc *GerritClient) GetChange(ctx context.Context, in *gerrit.GetChangeRequest, opts ...grpc.CallOption) (*gerrit.ChangeInfo, error)
- func (gc *GerritClient) GetMergeable(ctx context.Context, req *gerrit.GetMergeableRequest, opts ...grpc.CallOption) (*gerrit.MergeableInfo, error)
- func (gc *GerritClient) ListChanges(ctx context.Context, in *gerrit.ListChangesRequest, opts ...grpc.CallOption) (*gerrit.ListChangesResponse, error)
- func (gc *GerritClient) ListFiles(ctx context.Context, req *gerrit.ListFilesRequest, opts ...grpc.CallOption) (*gerrit.ListFilesResponse, error)
- func (gc *GerritClient) SetReview(ctx context.Context, in *gerrit.SetReviewRequest, opts ...grpc.CallOption) (*gerrit.ReviewResult, error)
- func (gc *GerritClient) SubmitChange(ctx context.Context, in *gerrit.SubmitChangeRequest, opts ...grpc.CallOption) (*gerrit.ChangeInfo, error)
- type GitilesClient
- func (g *GitilesClient) Archive(ctx context.Context, in *gitiles.ArchiveRequest, opts ...grpc.CallOption) (*gitiles.ArchiveResponse, error)
- func (g *GitilesClient) DownloadFile(ctx context.Context, in *gitiles.DownloadFileRequest, opts ...grpc.CallOption) (*gitiles.DownloadFileResponse, error)
- func (g *GitilesClient) Log(ctx context.Context, req *gitiles.LogRequest, opts ...grpc.CallOption) (*gitiles.LogResponse, error)
- func (g *GitilesClient) Projects(ctx context.Context, in *gitiles.ProjectsRequest, opts ...grpc.CallOption) (*gitiles.ProjectsResponse, error)
- func (g *GitilesClient) Refs(context.Context, *gitiles.RefsRequest, ...grpc.CallOption) (*gitiles.RefsResponse, error)
- func (g *GitilesClient) SetDeviceConfigs(ic *config.Inventory, configs []byte) error
- func (g *GitilesClient) SetInventory(ic *config.Inventory, data InventoryData) error
- func (g *GitilesClient) SetSplitInventory(ic *config.Inventory, data InventoryData) error
- type InventoryData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GerritChange ¶
type GerritChange struct { *gerrit.ChangeInfo GerritChangeEdit IsSubmitted bool }
GerritChange captures information about a single gerrit change created via GerritClient.CreateChange()
type GerritChangeEdit ¶
type GerritChangeEdit struct { // Maps file path to new contents of the file. Files map[string]string IsPublished bool IsAbandoned bool Subject string }
GerritChangeEdit captures information about a change edit created via GerritClient.ChangeEditFileContent on a ChangeEdit.
type GerritClient ¶
type GerritClient struct { Changes []*GerritChange // contains filtered or unexported fields }
GerritClient is a fake implementation of the gitstore.GerritClient interface.
func (*GerritClient) AbandonChange ¶
func (gc *GerritClient) AbandonChange(ctx context.Context, in *gerrit.AbandonChangeRequest, opts ...grpc.CallOption) (*gerrit.ChangeInfo, error)
AbandonChange implements the gerrit.GerritClient interface.
func (*GerritClient) ChangeEditFileContent ¶
func (gc *GerritClient) ChangeEditFileContent(ctx context.Context, in *gerrit.ChangeEditFileContentRequest, opts ...grpc.CallOption) (*empty.Empty, error)
ChangeEditFileContent implements the gerrit.GerritClient interface.
func (*GerritClient) ChangeEditPublish ¶
func (gc *GerritClient) ChangeEditPublish(ctx context.Context, in *gerrit.ChangeEditPublishRequest, opts ...grpc.CallOption) (*empty.Empty, error)
ChangeEditPublish implements the gerrit.GerritClient interface.
func (*GerritClient) CreateChange ¶
func (gc *GerritClient) CreateChange(ctx context.Context, in *gerrit.CreateChangeRequest, opts ...grpc.CallOption) (*gerrit.ChangeInfo, error)
CreateChange implements the gerrit.GerritClient interface.
func (*GerritClient) DeleteEditFileContent ¶
func (gc *GerritClient) DeleteEditFileContent(ctx context.Context, in *gerrit.DeleteEditFileContentRequest, opts ...grpc.CallOption) (*empty.Empty, error)
DeleteEditFileContent implements the gerrit.GerritClient interface.
func (*GerritClient) GetChange ¶
func (gc *GerritClient) GetChange(ctx context.Context, in *gerrit.GetChangeRequest, opts ...grpc.CallOption) (*gerrit.ChangeInfo, error)
GetChange implements the gerrit.GerritClient interface.
func (*GerritClient) GetMergeable ¶
func (gc *GerritClient) GetMergeable(ctx context.Context, req *gerrit.GetMergeableRequest, opts ...grpc.CallOption) (*gerrit.MergeableInfo, error)
GetMergeable implements the gerrit.GerritClient interface.
func (*GerritClient) ListChanges ¶
func (gc *GerritClient) ListChanges(ctx context.Context, in *gerrit.ListChangesRequest, opts ...grpc.CallOption) (*gerrit.ListChangesResponse, error)
ListChanges that match a query.
Note, although the Gerrit API supports multiple queries, for which it can return multiple lists of changes, this is not a foreseen use-case so this API just includes one query with one returned list of changes.
https://gerrit-review.googlesource.com/Documentation/rest-api-changes.html#list-changes
func (*GerritClient) ListFiles ¶
func (gc *GerritClient) ListFiles(ctx context.Context, req *gerrit.ListFilesRequest, opts ...grpc.CallOption) (*gerrit.ListFilesResponse, error)
ListFiles implements the gerrit.GerritClient interface.
func (*GerritClient) SetReview ¶
func (gc *GerritClient) SetReview(ctx context.Context, in *gerrit.SetReviewRequest, opts ...grpc.CallOption) (*gerrit.ReviewResult, error)
SetReview implements the gerrit.GerritClient interface.
func (*GerritClient) SubmitChange ¶
func (gc *GerritClient) SubmitChange(ctx context.Context, in *gerrit.SubmitChangeRequest, opts ...grpc.CallOption) (*gerrit.ChangeInfo, error)
SubmitChange implements the gerrit.GerritClient interface.
type GitilesClient ¶
GitilesClient is a fake implementation of the gitstore.GitilesClient interface.
func NewGitilesClient ¶
func NewGitilesClient() *GitilesClient
NewGitilesClient returns an initialized fake GitilesClient.
func (*GitilesClient) Archive ¶
func (g *GitilesClient) Archive(ctx context.Context, in *gitiles.ArchiveRequest, opts ...grpc.CallOption) (*gitiles.ArchiveResponse, error)
Archive implements gitiles.GitilesClient interface.
func (*GitilesClient) DownloadFile ¶
func (g *GitilesClient) DownloadFile(ctx context.Context, in *gitiles.DownloadFileRequest, opts ...grpc.CallOption) (*gitiles.DownloadFileResponse, error)
DownloadFile implements gitiles.GitilesClient inteface.
func (*GitilesClient) Log ¶
func (g *GitilesClient) Log(ctx context.Context, req *gitiles.LogRequest, opts ...grpc.CallOption) (*gitiles.LogResponse, error)
Log implements gitiles.GitilesClient interface.
func (*GitilesClient) Projects ¶
func (g *GitilesClient) Projects(ctx context.Context, in *gitiles.ProjectsRequest, opts ...grpc.CallOption) (*gitiles.ProjectsResponse, error)
Projects retrieves list of available Gitiles projects
func (*GitilesClient) Refs ¶
func (g *GitilesClient) Refs(context.Context, *gitiles.RefsRequest, ...grpc.CallOption) (*gitiles.RefsResponse, error)
Refs implements gitiles.GitilesClient interface.
func (*GitilesClient) SetDeviceConfigs ¶
func (g *GitilesClient) SetDeviceConfigs(ic *config.Inventory, configs []byte) error
SetDeviceConfigs sets the serialized device configs as returned from gitiles.
func (*GitilesClient) SetInventory ¶
func (g *GitilesClient) SetInventory(ic *config.Inventory, data InventoryData) error
SetInventory sets the serialized lab and infrastructure data as the inventory archive returned from gitiles. TODO(xixuan): remove this after per-file inventory is landed and tested.
func (*GitilesClient) SetSplitInventory ¶
func (g *GitilesClient) SetSplitInventory(ic *config.Inventory, data InventoryData) error
SetSplitInventory sets the serialized inventory data for the split inventory (each host has its own inventory file). archive returned from gitiles.
type InventoryData ¶
type InventoryData struct { Lab []byte Infrastructure []byte // The mapping from the path of the file where the DUT's inventory data is stored (relative the git project root) to its content. // E.g. chromeos-misc/jetstream-host.textpb => `duts { common {...} }` // // This will replace lab field when per-file inventory is enabled. See crbug.com/1008442 for details. Duts map[string][]byte }
InventoryData contains serialized proto files to be returned as part of the gitiles archive.