Documentation
¶
Overview ¶
Due to circular references, please avoid moving this file to testutil.
Due to circular references, please avoid moving this file to testutil.
Due to circular references, please avoid moving this file to testutil.
Due to circular references, please avoid moving this file to testutil.
Index ¶
- Constants
- func CreateTestPemFiles(portsMap map[string]int, tempDir string) (filesMap map[string]string, err error)
- func UpdateJobConfig(jobConfig *pb.JobConfig, projectConfig *pb.ProjectConfig) *pb.JobConfig
- type Command
- func (c *Command) ArchiveProject(projectID string) (string, error)
- func (c *Command) CancelJob(jobID string) error
- func (c *Command) CheckAndUpdateStatus(ids []string) (*pb.CheckAndUpdateStatusResponse, error)
- func (c *Command) CreateJob(projectID, query string, debugOpts *pb.DebugOptions, jobConfStr string) (string, error)
- func (c *Command) CreateProject(projectID, projectConf string) (string, error)
- func (c *Command) CreateTable(projectID, tableName, dbType, refTable string, ...) error
- func (c *Command) CreateView(projectId, viewName, body string) error
- func (c *Command) DeleteProject(projectID string) error
- func (c *Command) DeleteTable(projectID, name string) error
- func (c *Command) DeleteView(projectID, viewName string) error
- func (c *Command) DoQuery(projectID, query string, debugOpts *pb.DebugOptions, jobConfStr string) (*pb.QueryResponse, error)
- func (c *Command) GetCCL(projectID string, tables, destParties []string) (*pb.ShowCCLResponse, error)
- func (c *Command) GetExplain(projectID, query, jobConfStr string) (result *pb.ExplainInfo, err error)
- func (c *Command) GetInvitation() (*pb.ListInvitationsResponse, error)
- func (c *Command) GetProject(projectID string) (*pb.ListProjectsResponse, error)
- func (c *Command) GetResult(jobID string) (result *pb.FetchResultResponse, err error)
- func (c *Command) GetTable(projectID string, tableNames []string) (*pb.ListTablesResponse, error)
- func (c *Command) GetView(projectID string, viewNames []string) (*pb.ListViewsResponse, error)
- func (c *Command) GrantCCL(projectID string, ccls []*pb.ColumnControl) error
- func (c *Command) InviteMember(projectID, member string) error
- func (c *Command) ProcessInvitation(ids string, accept bool) error
- func (c *Command) RevokeCCL(projectID, party string, ccls []*pb.ColumnControl) error
- type ResponseCheck
- type ResponseWrapper
- type StatusGetter
- type TestAppBuilder
Constants ¶
View Source
const ( AlicePemFilKey = "alice_pem_file" BobPemFileKey = "bob_pem_file" CarolPemFileKey = "carol_pem_file" PartyInfoFileKey = "party_info_file" )
Variables ¶
This section is empty.
Functions ¶
func CreateTestPemFiles ¶
func UpdateJobConfig ¶
Types ¶
type Command ¶
type Command struct {
// contains filtered or unexported fields
}
Simplify the complexity of calling HTTP interfaces when writing debugging tools or test code.
func NewCommand ¶
func (*Command) CheckAndUpdateStatus ¶
func (c *Command) CheckAndUpdateStatus(ids []string) (*pb.CheckAndUpdateStatusResponse, error)
func (*Command) CreateProject ¶
func (*Command) CreateTable ¶
func (c *Command) CreateTable(projectID, tableName, dbType, refTable string, columns []*pb.CreateTableRequest_ColumnDesc) error
func (*Command) CreateView ¶
func (*Command) DeleteProject ¶
func (*Command) DeleteTable ¶
func (*Command) DeleteView ¶
func (*Command) DoQuery ¶
func (c *Command) DoQuery(projectID, query string, debugOpts *pb.DebugOptions, jobConfStr string) (*pb.QueryResponse, error)
func (*Command) GetExplain ¶
func (c *Command) GetExplain(projectID, query, jobConfStr string) (result *pb.ExplainInfo, err error)
func (*Command) GetInvitation ¶
func (c *Command) GetInvitation() (*pb.ListInvitationsResponse, error)
func (*Command) GetProject ¶
func (c *Command) GetProject(projectID string) (*pb.ListProjectsResponse, error)
func (*Command) GetResult ¶
func (c *Command) GetResult(jobID string) (result *pb.FetchResultResponse, err error)
func (*Command) GrantCCL ¶
func (c *Command) GrantCCL(projectID string, ccls []*pb.ColumnControl) error
func (*Command) InviteMember ¶
func (*Command) ProcessInvitation ¶
type ResponseCheck ¶
type ResponseWrapper ¶
type ResponseWrapper[T StatusGetter] struct { Response T }
func NewResponseWrapper ¶
func NewResponseWrapper[T StatusGetter](response T) *ResponseWrapper[T]
func (*ResponseWrapper[T]) FormatResponse ¶
func (resp *ResponseWrapper[T]) FormatResponse() string
func (*ResponseWrapper[T]) GetStatusCode ¶
func (resp *ResponseWrapper[T]) GetStatusCode() int32
type StatusGetter ¶
type TestAppBuilder ¶
type TestAppBuilder struct {
PartyInfoTmpPath string
PemFilePaths map[string]string
ServerAlice *httptest.Server
ServerBob *httptest.Server
ServerCarol *httptest.Server
ServerEngine *httptest.Server
ServerAliceUrl string
ServerBobUrl string
ServerCarolUrl string
ServerEngineUrl string
AppAlice *application.App
AppBob *application.App
AppCarol *application.App
}
func (*TestAppBuilder) BuildAppTests ¶
func (b *TestAppBuilder) BuildAppTests(tempDir string) error
Click to show internal directories.
Click to hide internal directories.