Documentation
¶
Overview ¶
Package query is a generated GoMock package.
Index ¶
- type AccountInfo
- type BioosInfo
- type BioosInfoMeta
- type BucketsAuthInfo
- type Executor
- type ExecutorLog
- type ExternalBucketAuthInfo
- type FakeReadModel
- func (m *FakeReadModel) EXPECT() *FakeReadModelMockRecorder
- func (m *FakeReadModel) GatherResources(ctx context.Context, filter *GatherFilter) (*TasksResources, error)
- func (m *FakeReadModel) GetBasic(ctx context.Context, id string) (*TaskBasic, error)
- func (m *FakeReadModel) GetFull(ctx context.Context, id string) (*Task, error)
- func (m *FakeReadModel) GetMinimal(ctx context.Context, id string) (*TaskMinimal, error)
- func (m *FakeReadModel) ListAccounts(ctx context.Context) ([]*AccountInfo, error)
- func (m *FakeReadModel) ListBasic(ctx context.Context, pageSize int, pageToken *utils.PageToken, ...) ([]*TaskBasic, *utils.PageToken, error)
- func (m *FakeReadModel) ListFull(ctx context.Context, pageSize int, pageToken *utils.PageToken, ...) ([]*Task, *utils.PageToken, error)
- func (m *FakeReadModel) ListMinimal(ctx context.Context, pageSize int, pageToken *utils.PageToken, ...) ([]*TaskMinimal, *utils.PageToken, error)
- type FakeReadModelMockRecorder
- func (mr *FakeReadModelMockRecorder) GatherResources(ctx, filter interface{}) *gomock.Call
- func (mr *FakeReadModelMockRecorder) GetBasic(ctx, id interface{}) *gomock.Call
- func (mr *FakeReadModelMockRecorder) GetFull(ctx, id interface{}) *gomock.Call
- func (mr *FakeReadModelMockRecorder) GetMinimal(ctx, id interface{}) *gomock.Call
- func (mr *FakeReadModelMockRecorder) ListAccounts(ctx interface{}) *gomock.Call
- func (mr *FakeReadModelMockRecorder) ListBasic(ctx, pageSize, pageToken, filter interface{}) *gomock.Call
- func (mr *FakeReadModelMockRecorder) ListFull(ctx, pageSize, pageToken, filter interface{}) *gomock.Call
- func (mr *FakeReadModelMockRecorder) ListMinimal(ctx, pageSize, pageToken, filter interface{}) *gomock.Call
- type GPUResource
- type GatherFilter
- type GatherHandler
- type GatherQuery
- type GetHandler
- type GetQuery
- type Input
- type ListAccountsHandler
- type ListFilter
- type ListHandler
- type ListQuery
- type Output
- type Queries
- type ReadModel
- type Resources
- type Task
- type TaskBasic
- type TaskLog
- type TaskMinimal
- type TasksResources
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BioosInfo ¶
type BioosInfo struct {
AccountID string
UserID string
SubmissionID string
RunID string
Meta *BioosInfoMeta
}
BioosInfo ...
type BioosInfoMeta ¶
type BioosInfoMeta struct {
AAIPassport *string
MountTOS *bool
BucketsAuthInfo *BucketsAuthInfo
}
BioosInfoMeta ...
type BucketsAuthInfo ¶
type BucketsAuthInfo struct {
ReadOnly []string
ReadWrite []string
External []*ExternalBucketAuthInfo
}
BucketsAuthInfo ...
type Executor ¶
type Executor struct {
Image string
Command []string
Workdir string
Stdin string
Stdout string
Stderr string
Env map[string]string
}
Executor ...
type ExecutorLog ¶
ExecutorLog ...
type ExternalBucketAuthInfo ¶
ExternalBucketAuthInfo ...
type FakeReadModel ¶
type FakeReadModel struct {
// contains filtered or unexported fields
}
FakeReadModel is a mock of ReadModel interface.
func NewFakeReadModel ¶
func NewFakeReadModel(ctrl *gomock.Controller) *FakeReadModel
NewFakeReadModel creates a new mock instance.
func (*FakeReadModel) EXPECT ¶
func (m *FakeReadModel) EXPECT() *FakeReadModelMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*FakeReadModel) GatherResources ¶
func (m *FakeReadModel) GatherResources(ctx context.Context, filter *GatherFilter) (*TasksResources, error)
GatherResources mocks base method.
func (*FakeReadModel) GetMinimal ¶
func (m *FakeReadModel) GetMinimal(ctx context.Context, id string) (*TaskMinimal, error)
GetMinimal mocks base method.
func (*FakeReadModel) ListAccounts ¶
func (m *FakeReadModel) ListAccounts(ctx context.Context) ([]*AccountInfo, error)
ListAccounts mocks base method.
func (*FakeReadModel) ListBasic ¶
func (m *FakeReadModel) ListBasic(ctx context.Context, pageSize int, pageToken *utils.PageToken, filter *ListFilter) ([]*TaskBasic, *utils.PageToken, error)
ListBasic mocks base method.
func (*FakeReadModel) ListFull ¶
func (m *FakeReadModel) ListFull(ctx context.Context, pageSize int, pageToken *utils.PageToken, filter *ListFilter) ([]*Task, *utils.PageToken, error)
ListFull mocks base method.
func (*FakeReadModel) ListMinimal ¶
func (m *FakeReadModel) ListMinimal(ctx context.Context, pageSize int, pageToken *utils.PageToken, filter *ListFilter) ([]*TaskMinimal, *utils.PageToken, error)
ListMinimal mocks base method.
type FakeReadModelMockRecorder ¶
type FakeReadModelMockRecorder struct {
// contains filtered or unexported fields
}
FakeReadModelMockRecorder is the mock recorder for FakeReadModel.
func (*FakeReadModelMockRecorder) GatherResources ¶
func (mr *FakeReadModelMockRecorder) GatherResources(ctx, filter interface{}) *gomock.Call
GatherResources indicates an expected call of GatherResources.
func (*FakeReadModelMockRecorder) GetBasic ¶
func (mr *FakeReadModelMockRecorder) GetBasic(ctx, id interface{}) *gomock.Call
GetBasic indicates an expected call of GetBasic.
func (*FakeReadModelMockRecorder) GetFull ¶
func (mr *FakeReadModelMockRecorder) GetFull(ctx, id interface{}) *gomock.Call
GetFull indicates an expected call of GetFull.
func (*FakeReadModelMockRecorder) GetMinimal ¶
func (mr *FakeReadModelMockRecorder) GetMinimal(ctx, id interface{}) *gomock.Call
GetMinimal indicates an expected call of GetMinimal.
func (*FakeReadModelMockRecorder) ListAccounts ¶
func (mr *FakeReadModelMockRecorder) ListAccounts(ctx interface{}) *gomock.Call
ListAccounts indicates an expected call of ListAccounts.
func (*FakeReadModelMockRecorder) ListBasic ¶
func (mr *FakeReadModelMockRecorder) ListBasic(ctx, pageSize, pageToken, filter interface{}) *gomock.Call
ListBasic indicates an expected call of ListBasic.
func (*FakeReadModelMockRecorder) ListFull ¶
func (mr *FakeReadModelMockRecorder) ListFull(ctx, pageSize, pageToken, filter interface{}) *gomock.Call
ListFull indicates an expected call of ListFull.
func (*FakeReadModelMockRecorder) ListMinimal ¶
func (mr *FakeReadModelMockRecorder) ListMinimal(ctx, pageSize, pageToken, filter interface{}) *gomock.Call
ListMinimal indicates an expected call of ListMinimal.
type GatherFilter ¶
type GatherFilter struct {
State []string `validate:"dive,oneof=QUEUED INITIALIZING RUNNING COMPLETE SYSTEM_ERROR EXECUTOR_ERROR CANCELING CANCELED"`
ClusterID string
WithCluster bool
AccountID string
UserID string
}
GatherFilter ...
type GatherHandler ¶
type GatherHandler interface {
Handle(ctx context.Context, query *GatherQuery) (*TasksResources, error)
}
GatherHandler ...
func NewGatherHandler ¶
func NewGatherHandler(readModel ReadModel) GatherHandler
NewGatherHandler ...
type GetHandler ¶
GetHandler ...
type GetQuery ¶
type GetQuery struct {
ID string `validate:"required"`
View string `validate:"oneof=MINIMAL BASIC FULL"`
}
GetQuery ...
type Input ¶
type Input struct {
Name string
Description string
Path string
Type string
URL string
Content string
}
Input ...
type ListAccountsHandler ¶
type ListAccountsHandler interface {
Handle(ctx context.Context) ([]*AccountInfo, error)
}
ListAccountsHandler ...
func NewListAccountsHandler ¶
func NewListAccountsHandler(readModel ReadModel) ListAccountsHandler
NewListAccountsHandler ...
type ListFilter ¶
type ListFilter struct {
NamePrefix string
State []string `validate:"dive,oneof=QUEUED INITIALIZING RUNNING COMPLETE SYSTEM_ERROR EXECUTOR_ERROR CANCELING CANCELED"`
ClusterID string
WithoutCluster bool
}
ListFilter ...
type ListHandler ¶
type ListHandler interface {
Handle(ctx context.Context, query *ListQuery) ([]*Task, *utils.PageToken, error)
}
ListHandler ...
type ListQuery ¶
type ListQuery struct {
View string `validate:"oneof=MINIMAL BASIC FULL"`
PageSize int `validate:"gte=0,lte=2048"`
PageToken *utils.PageToken
Filter *ListFilter
}
ListQuery ...
type Queries ¶
type Queries struct {
List ListHandler
Get GetHandler
Gather GatherHandler
ListAccounts ListAccountsHandler
}
Queries ...
type ReadModel ¶
type ReadModel interface {
ListMinimal(ctx context.Context, pageSize int, pageToken *utils.PageToken, filter *ListFilter) ([]*TaskMinimal, *utils.PageToken, error)
ListBasic(ctx context.Context, pageSize int, pageToken *utils.PageToken, filter *ListFilter) ([]*TaskBasic, *utils.PageToken, error)
ListFull(ctx context.Context, pageSize int, pageToken *utils.PageToken, filter *ListFilter) ([]*Task, *utils.PageToken, error)
GetMinimal(ctx context.Context, id string) (*TaskMinimal, error)
GetBasic(ctx context.Context, id string) (*TaskBasic, error)
GetFull(ctx context.Context, id string) (*Task, error)
GatherResources(ctx context.Context, filter *GatherFilter) (*TasksResources, error)
ListAccounts(ctx context.Context) ([]*AccountInfo, error)
}
ReadModel ...
type Resources ¶
type Resources struct {
CPUCores int
RamGB float64 // nolint
DiskGB float64
BootDiskGB *int
GPU *GPUResource
}
Resources ...
type TaskBasic ¶
type TaskBasic struct {
TaskMinimal
Name string
Description string
Resources *Resources
Executors []*Executor
Volumes []string
Tags map[string]string
Logs []*TaskLog
CreationTime time.Time
BioosInfo *BioosInfo
PriorityValue int
ClusterID string
}
TaskBasic ...