Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Factory ¶
func Factory(fakes map[string]*Host) gerrit.GerritClientFactory
Factory creates a factory that returns RPC clients that use fake data to respond to requests.
The fake data is taken from the fakes argument, which is a map from host names to the Host instances containing the fake data for the host. Missing keys will have a default Host. A nil value indicates that the given host is not a gerrit instance.
Types ¶
type Change ¶
type Change struct { // Ref is the target ref for the change. Ref string // Patchsets maps patchset number (>0) to details of the patchset. // // Revision info will be generated for each patchset with number up to // the greatest key. If no patchsets are provided, the change will have // one patchset generated. Any generated patchsets will have a generated // revision but affect no files. A nil value will be treated as a // default Patchset. Patchsets map[int32]*Patchset }
Change is the fake data for a gerrit change.
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is the client that will serve fake data for a given host.
func (*Client) GetChange ¶
func (c *Client) GetChange(ctx context.Context, request *gerritpb.GetChangeRequest, opts ...grpc.CallOption) (*gerritpb.ChangeInfo, error)
type Host ¶
type Host struct { // Projects maps project names to their details. // // Missing keys will have a default fake project. A nil value indicates // the the project does not exist. Projects map[string]*Project }
Host is the fake data for a gerrit host.
Click to show internal directories.
Click to hide internal directories.