Documentation ¶
Overview ¶
Package resultdb contains logic of interacting with resultdb.
Index ¶
- type Client
- func (c *Client) GetInvocation(ctx context.Context, invName string) (*rdbpb.Invocation, error)
- func (c *Client) QueryRunTestVerdicts(ctx context.Context, req *rdbpb.QueryRunTestVerdictsRequest) (*rdbpb.QueryRunTestVerdictsResponse, error)
- func (c *Client) QueryTestVariants(ctx context.Context, req *rdbpb.QueryTestVariantsRequest) (*rdbpb.QueryTestVariantsResponse, error)
- type MockedClient
- func (mc *MockedClient) BatchGetTestVariants(req *rdbpb.BatchGetTestVariantsRequest, ...)
- func (mc *MockedClient) GetInvocation(req *rdbpb.GetInvocationRequest, res *rdbpb.Invocation)
- func (mc *MockedClient) GetRealm(inv, realm string)
- func (mc *MockedClient) QueryRunTestVerdicts(req *rdbpb.QueryRunTestVerdictsRequest, ...)
- func (mc *MockedClient) QueryTestVariants(req *rdbpb.QueryTestVariantsRequest, res *rdbpb.QueryTestVariantsResponse)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is the client to communicate with ResultDB. It wraps a rdbpb.ResultDBClient.
func NewClient ¶
NewClient creates a client to communicate with ResultDB, acting as the given project. Recommended way to construct a ResultDB client.
func NewPrivilegedClient ¶
NewPrivilegedClient creates a client to communicate with ResultDB, acting as LUCI Analysis to access data from any project.
Caution: Callers must take special care to avoid "confused deputy" issues when using this client, e.g. being tricked by one project to access the resources of another. ResultDB will not check the accessed resource is in the project that was intended.
func (*Client) GetInvocation ¶
GetInvocation retrieves the invocation.
func (*Client) QueryRunTestVerdicts ¶
func (c *Client) QueryRunTestVerdicts(ctx context.Context, req *rdbpb.QueryRunTestVerdictsRequest) (*rdbpb.QueryRunTestVerdictsResponse, error)
QueryRunTestVerdicts queries a single page of test variants from a test run.
func (*Client) QueryTestVariants ¶
func (c *Client) QueryTestVariants(ctx context.Context, req *rdbpb.QueryTestVariantsRequest) (*rdbpb.QueryTestVariantsResponse, error)
QueryTestVariants queries a single page of test variants.
type MockedClient ¶
type MockedClient struct { Client *rdbpb.MockResultDBClient Ctx context.Context }
MockedClient is a mocked ResultDB client for testing. It wraps a rdbpb.MockResultDBClient and a context with the mocked client.
func NewMockedClient ¶
func NewMockedClient(ctx context.Context, ctl *gomock.Controller) *MockedClient
NewMockedClient creates a MockedClient for testing.
func (*MockedClient) BatchGetTestVariants ¶
func (mc *MockedClient) BatchGetTestVariants(req *rdbpb.BatchGetTestVariantsRequest, res *rdbpb.BatchGetTestVariantsResponse)
BatchGetTestVariants mocks the BatchGetTestVariants RPC.
func (*MockedClient) GetInvocation ¶
func (mc *MockedClient) GetInvocation(req *rdbpb.GetInvocationRequest, res *rdbpb.Invocation)
GetInvocation mocks the GetInvocation RPC.
func (*MockedClient) GetRealm ¶
func (mc *MockedClient) GetRealm(inv, realm string)
GetRealm is a shortcut of GetInvocation to get realm of the invocation.
func (*MockedClient) QueryRunTestVerdicts ¶
func (mc *MockedClient) QueryRunTestVerdicts(req *rdbpb.QueryRunTestVerdictsRequest, res *rdbpb.QueryRunTestVerdictsResponse)
QueryRunTestVerdicts mocks the QueryRunTestVerdicts RPC.
func (*MockedClient) QueryTestVariants ¶
func (mc *MockedClient) QueryTestVariants(req *rdbpb.QueryTestVariantsRequest, res *rdbpb.QueryTestVariantsResponse)
QueryTestVariants mocks the QueryTestVariants RPC.