query

package
v1.15.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 7, 2025 License: Apache-2.0 Imports: 8 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package query is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccountInfo

type AccountInfo struct {
	AccountID string
	UserIDs   []string
}

AccountInfo ...

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

type ExecutorLog struct {
	ExecutorID string
	StartTime  *time.Time
	EndTime    *time.Time
}

ExecutorLog ...

type ExternalBucketAuthInfo

type ExternalBucketAuthInfo struct {
	Bucket string
	AK     string
	SK     string
}

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

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) GetBasic

func (m *FakeReadModel) GetBasic(ctx context.Context, id string) (*TaskBasic, error)

GetBasic mocks base method.

func (*FakeReadModel) GetFull

func (m *FakeReadModel) GetFull(ctx context.Context, id string) (*Task, error)

GetFull 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 GPUResource

type GPUResource struct {
	Count float64
	Type  string
}

GPUResource ...

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 GatherQuery

type GatherQuery struct {
	Filter *GatherFilter
}

GatherQuery ...

type GetHandler

type GetHandler interface {
	Handle(ctx context.Context, query *GetQuery) (*Task, error)
}

GetHandler ...

func NewGetHandler

func NewGetHandler(readModel ReadModel) GetHandler

NewGetHandler ...

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 ...

func NewListHandler

func NewListHandler(readModel ReadModel) ListHandler

NewListHandler ...

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 Output

type Output struct {
	Name        string
	Description string
	Path        string
	Type        string
	URL         string
}

Output ...

type Queries

type Queries struct {
	List         ListHandler
	Get          GetHandler
	Gather       GatherHandler
	ListAccounts ListAccountsHandler
}

Queries ...

func NewQueries

func NewQueries(readModel ReadModel) *Queries

NewQueries ...

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 Task

type Task struct {
	TaskBasic
	Inputs  []*Input
	Outputs []*Output
}

Task ...

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 ...

type TaskLog

type TaskLog struct {
	ClusterID  string
	Logs       [][]*ExecutorLog
	StartTime  *time.Time
	EndTime    *time.Time
	SystemLogs []string
}

TaskLog ...

type TaskMinimal

type TaskMinimal struct {
	ID    string
	State string
}

TaskMinimal ...

type TasksResources

type TasksResources struct {
	Count    int
	CPUCores int
	RamGB    float64 // nolint
	DiskGB   float64
	GPU      map[string]float64
}

TasksResources ...

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL