graph

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2024 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewExecutableSchema

func NewExecutableSchema(cfg Config) graphql.ExecutableSchema

NewExecutableSchema creates an ExecutableSchema from the ResolverRoot interface.

func Router

func Router(e *echo.Echo, cfg *config.Config, resolver ResolverRoot) error

Types

type ActorResolver

type ActorResolver interface {
	ID(ctx context.Context, obj *model.Actor) (string, error)

	QualityAdjustedPower(ctx context.Context, obj *model.Actor) (*types.BigInt, error)
	RawBytePower(ctx context.Context, obj *model.Actor) (*types.BigInt, error)
	ActorBalance(ctx context.Context, obj *model.Actor) (*types.BigInt, error)
	ActorAvailableBalance(ctx context.Context, obj *model.Actor) (*types.BigInt, error)
	WorkerBalance(ctx context.Context, obj *model.Actor) (*types.BigInt, error)
	Deadlines(ctx context.Context, obj *model.Actor) ([]*model.ActorDeadline, error)
}

type ComplexityRoot

type ComplexityRoot struct {
	Actor struct {
		ActorAvailableBalance func(childComplexity int) int
		ActorBalance          func(childComplexity int) int
		Address               func(childComplexity int) int
		Deadlines             func(childComplexity int) int
		ID                    func(childComplexity int) int
		Layers                func(childComplexity int) int
		QualityAdjustedPower  func(childComplexity int) int
		RawBytePower          func(childComplexity int) int
		WorkerBalance         func(childComplexity int) int
	}

	ActorDeadline struct {
		Current    func(childComplexity int) int
		Empty      func(childComplexity int) int
		Faulty     func(childComplexity int) int
		PartFaulty func(childComplexity int) int
		Proven     func(childComplexity int) int
	}

	Alert struct {
		ID          func(childComplexity int) int
		MachineName func(childComplexity int) int
		Message     func(childComplexity int) int
	}

	Config struct {
		Config func(childComplexity int) int
		ID     func(childComplexity int) int
		Title  func(childComplexity int) int
		UsedBy func(childComplexity int) int
	}

	GaugeCountValue struct {
		Key   func(childComplexity int) int
		Value func(childComplexity int) int
	}

	Machine struct {
		CPU           func(childComplexity int) int
		Detail        func(childComplexity int) int
		Gpu           func(childComplexity int) int
		HostAndPort   func(childComplexity int) int
		ID            func(childComplexity int) int
		LastContact   func(childComplexity int) int
		Metrics       func(childComplexity int) int
		RAM           func(childComplexity int) int
		Storages      func(childComplexity int) int
		TaskHistories func(childComplexity int, last int) int
		Tasks         func(childComplexity int) int
	}

	MachineDetail struct {
		ID          func(childComplexity int) int
		Layers      func(childComplexity int) int
		LayersArray func(childComplexity int) int
		MachineID   func(childComplexity int) int
		MachineName func(childComplexity int) int
		Miners      func(childComplexity int) int
		MinersArray func(childComplexity int) int
		StartupTime func(childComplexity int) int
		Tasks       func(childComplexity int) int
		TasksArray  func(childComplexity int) int
	}

	MachineMetrics struct {
		ActiveTasks                func(childComplexity int) int
		AddedTasks                 func(childComplexity int) int
		CPUUsage                   func(childComplexity int) int
		GoRoutines                 func(childComplexity int) int
		GoThreads                  func(childComplexity int) int
		GoVersion                  func(childComplexity int) int
		GpuUsage                   func(childComplexity int) int
		ProcessCPUSecondsTotal     func(childComplexity int) int
		ProcessMaxFds              func(childComplexity int) int
		ProcessOpenFds             func(childComplexity int) int
		ProcessResidentMemoryBytes func(childComplexity int) int
		ProcessStartTimeSeconds    func(childComplexity int) int
		ProcessVirtualMemoryBytes  func(childComplexity int) int
		RAMUsage                   func(childComplexity int) int
		TasksCompleted             func(childComplexity int) int
		TasksStarted               func(childComplexity int) int
	}

	MachineSummary struct {
		Total            func(childComplexity int) int
		TotalCPU         func(childComplexity int) int
		TotalDown        func(childComplexity int) int
		TotalGpu         func(childComplexity int) int
		TotalRAM         func(childComplexity int) int
		TotalUp          func(childComplexity int) int
		UniqueHostsDown  func(childComplexity int) int
		UniqueHostsTotal func(childComplexity int) int
		UniqueHostsUp    func(childComplexity int) int
	}

	MetricsActiveTask struct {
		Name   func(childComplexity int) int
		Series func(childComplexity int) int
	}

	Miner struct {
		AvailableBalance func(childComplexity int) int
		Info             func(childComplexity int) int
		Power            func(childComplexity int) int
	}

	MinerBeneficiaryTerm struct {
		Expiration func(childComplexity int) int
		Quota      func(childComplexity int) int
		UsedQuota  func(childComplexity int) int
	}

	MinerInfo struct {
		Beneficiary                func(childComplexity int) int
		BeneficiaryTerm            func(childComplexity int) int
		ConsensusFaultElapsed      func(childComplexity int) int
		ControlAddresses           func(childComplexity int) int
		MultiAddrs                 func(childComplexity int) int
		NewWorker                  func(childComplexity int) int
		Owner                      func(childComplexity int) int
		PeerID                     func(childComplexity int) int
		PendingBeneficiaryChange   func(childComplexity int) int
		PendingOwnerAddress        func(childComplexity int) int
		SectorSize                 func(childComplexity int) int
		WindowPoStPartitionSectors func(childComplexity int) int
		WindowPoStProofType        func(childComplexity int) int
		Worker                     func(childComplexity int) int
		WorkerChangeEpoch          func(childComplexity int) int
	}

	MinerPendingBeneficiaryChange struct {
		ApprovedByBeneficiary func(childComplexity int) int
		ApprovedByNominee     func(childComplexity int) int
		NewBeneficiary        func(childComplexity int) int
		NewExpiration         func(childComplexity int) int
		NewQuota              func(childComplexity int) int
	}

	MinerPower struct {
		HasMinPower func(childComplexity int) int
		ID          func(childComplexity int) int
		MinerPower  func(childComplexity int) int
		TotalPower  func(childComplexity int) int
	}

	MiningSummaryDay struct {
		Day      func(childComplexity int) int
		Miner    func(childComplexity int) int
		WonBlock func(childComplexity int) int
	}

	Mutation struct {
		CreateConfig func(childComplexity int, title string, config string) int
		UpdateConfig func(childComplexity int, title string, config string) int
	}

	NodeInfo struct {
		Address   func(childComplexity int) int
		ID        func(childComplexity int) int
		Layers    func(childComplexity int) int
		Reachable func(childComplexity int) int
		SyncState func(childComplexity int) int
		Version   func(childComplexity int) int
	}

	OpenSectorPiece struct {
		CreatedAt                     func(childComplexity int) int
		DataDeleteOnFinalize          func(childComplexity int) int
		DataHeaders                   func(childComplexity int) int
		DataRawSize                   func(childComplexity int) int
		DataURL                       func(childComplexity int) int
		DirectEndEpoch                func(childComplexity int) int
		DirectPieceActivationManifest func(childComplexity int) int
		DirectStartEpoch              func(childComplexity int) int
		F05DealEndEpoch               func(childComplexity int) int
		F05DealID                     func(childComplexity int) int
		F05DealProposal               func(childComplexity int) int
		F05DealStartEpoch             func(childComplexity int) int
		F05PublishCid                 func(childComplexity int) int
		IsSnap                        func(childComplexity int) int
		PieceCid                      func(childComplexity int) int
		PieceIndex                    func(childComplexity int) int
		PieceSize                     func(childComplexity int) int
		SectorNumber                  func(childComplexity int) int
		SpID                          func(childComplexity int) int
	}

	Pipeline struct {
		AfterCommitMsg           func(childComplexity int) int
		AfterCommitMsgSuccess    func(childComplexity int) int
		AfterFinalize            func(childComplexity int) int
		AfterMoveStorage         func(childComplexity int) int
		AfterPorep               func(childComplexity int) int
		AfterPrecommitMsg        func(childComplexity int) int
		AfterPrecommitMsgSuccess func(childComplexity int) int
		AfterSdr                 func(childComplexity int) int
		AfterSynth               func(childComplexity int) int
		AfterTreeC               func(childComplexity int) int
		AfterTreeD               func(childComplexity int) int
		AfterTreeR               func(childComplexity int) int
		CommitMsgCid             func(childComplexity int) int
		CommitMsgTsk             func(childComplexity int) int
		CreateTime               func(childComplexity int) int
		CurrentTask              func(childComplexity int) int
		Failed                   func(childComplexity int) int
		FailedAt                 func(childComplexity int) int
		FailedReason             func(childComplexity int) int
		FailedReasonMsg          func(childComplexity int) int
		ID                       func(childComplexity int) int
		PorepProof               func(childComplexity int) int
		PrecommitMsgCid          func(childComplexity int) int
		PrecommitMsgTsk          func(childComplexity int) int
		RegSealProof             func(childComplexity int) int
		SectorNumber             func(childComplexity int) int
		SeedEpoch                func(childComplexity int) int
		SeedValue                func(childComplexity int) int
		SpID                     func(childComplexity int) int
		Status                   func(childComplexity int) int
		TaskIDCommitMsg          func(childComplexity int) int
		TaskIDFinalize           func(childComplexity int) int
		TaskIDMoveStorage        func(childComplexity int) int
		TaskIDPorep              func(childComplexity int) int
		TaskIDPrecommitMsg       func(childComplexity int) int
		TaskIDSdr                func(childComplexity int) int
		TaskIDSynth              func(childComplexity int) int
		TaskIDTreeC              func(childComplexity int) int
		TaskIDTreeD              func(childComplexity int) int
		TaskIDTreeR              func(childComplexity int) int
		TicketEpoch              func(childComplexity int) int
		TicketValue              func(childComplexity int) int
		TreeDCid                 func(childComplexity int) int
		TreeRCid                 func(childComplexity int) int
		UserSectorDurationEpochs func(childComplexity int) int
	}

	PipelineSummary struct {
		CommitMsg    func(childComplexity int) int
		Done         func(childComplexity int) int
		Failed       func(childComplexity int) int
		ID           func(childComplexity int) int
		Porep        func(childComplexity int) int
		PrecommitMsg func(childComplexity int) int
		Sdr          func(childComplexity int) int
		Trees        func(childComplexity int) int
		WaitSeed     func(childComplexity int) int
	}

	PowerClaim struct {
		QualityAdjPower func(childComplexity int) int
		RawBytePower    func(childComplexity int) int
	}

	Query struct {
		Actor                  func(childComplexity int, address types.Address) int
		Actors                 func(childComplexity int) int
		Alerts                 func(childComplexity int) int
		Config                 func(childComplexity int, layer string) int
		Configs                func(childComplexity int) int
		DealsPending           func(childComplexity int) int
		Machine                func(childComplexity int, id int) int
		MachineSummary         func(childComplexity int) int
		Machines               func(childComplexity int) int
		MetricsActiveTasks     func(childComplexity int, lastDays int, machine *string) int
		Miner                  func(childComplexity int, address types.Address) int
		MinerPower             func(childComplexity int, address *types.Address) int
		MiningSummaryByDay     func(childComplexity int, start time.Time, end time.Time) int
		NodesInfo              func(childComplexity int) int
		Pipelines              func(childComplexity int) int
		PipelinesSummary       func(childComplexity int) int
		Sector                 func(childComplexity int, actor types.ActorID, sectorNumber int) int
		Sectors                func(childComplexity int, actor *types.ActorID, sectorNumber *int, offset int, limit int) int
		SectorsCount           func(childComplexity int, actor *types.ActorID) int
		StoragePaths           func(childComplexity int) int
		StorageStats           func(childComplexity int) int
		Task                   func(childComplexity int, id int) int
		TaskHistories          func(childComplexity int, offset int, limit int) int
		TaskHistoriesAggregate func(childComplexity int, start time.Time, end time.Time, interval model.TaskHistoriesAggregateInterval) int
		TaskHistoriesCount     func(childComplexity int, start time.Time, end time.Time, machine *string, name *string, success *bool) int
		Tasks                  func(childComplexity int) int
		TasksCount             func(childComplexity int) int
	}

	Sector struct {
		Events    func(childComplexity int) int
		ID        func(childComplexity int) int
		Locations func(childComplexity int) int
		Meta      func(childComplexity int) int
		Pieces    func(childComplexity int) int
		SectorNum func(childComplexity int) int
		SpID      func(childComplexity int) int
		Tasks     func(childComplexity int) int
	}

	SectorLocation struct {
		IsPrimary      func(childComplexity int) int
		MinerID        func(childComplexity int) int
		ReadRefs       func(childComplexity int) int
		ReadTs         func(childComplexity int) int
		SectorFiletype func(childComplexity int) int
		SectorNum      func(childComplexity int) int
		StorageID      func(childComplexity int) int
		WriteLockOwner func(childComplexity int) int
		WriteTs        func(childComplexity int) int
	}

	SectorMeta struct {
		CurSealedCid    func(childComplexity int) int
		CurUnsealedCid  func(childComplexity int) int
		ExpirationEpoch func(childComplexity int) int
		ID              func(childComplexity int) int
		IsCC            func(childComplexity int) int
		MsgCidCommit    func(childComplexity int) int
		MsgCidPrecommit func(childComplexity int) int
		MsgCidUpdate    func(childComplexity int) int
		OrigSealedCid   func(childComplexity int) int
		OrigUnsealedCid func(childComplexity int) int
		RegSealProof    func(childComplexity int) int
		SectorNum       func(childComplexity int) int
		SeedEpoch       func(childComplexity int) int
		SeedValue       func(childComplexity int) int
		SpID            func(childComplexity int) int
		TicketEpoch     func(childComplexity int) int
		TicketValue     func(childComplexity int) int
	}

	SectorMetaPiece struct {
		DdoPam            func(childComplexity int) int
		F05DealID         func(childComplexity int) int
		F05DealProposal   func(childComplexity int) int
		OrigEndEpoch      func(childComplexity int) int
		PieceCid          func(childComplexity int) int
		PieceNum          func(childComplexity int) int
		PieceSize         func(childComplexity int) int
		RawDataSize       func(childComplexity int) int
		RequestedKeepData func(childComplexity int) int
		SectorNum         func(childComplexity int) int
		SpID              func(childComplexity int) int
		StartEpoch        func(childComplexity int) int
	}

	StoragePath struct {
		AllowMiners   func(childComplexity int) int
		AllowTo       func(childComplexity int) int
		AllowTypes    func(childComplexity int) int
		Available     func(childComplexity int) int
		CanSeal       func(childComplexity int) int
		CanStore      func(childComplexity int) int
		Capacity      func(childComplexity int) int
		DenyMiners    func(childComplexity int) int
		DenyTypes     func(childComplexity int) int
		FsAvailable   func(childComplexity int) int
		Groups        func(childComplexity int) int
		HeartbeatErr  func(childComplexity int) int
		ID            func(childComplexity int) int
		LastHeartbeat func(childComplexity int) int
		MaxStorage    func(childComplexity int) int
		Reserved      func(childComplexity int) int
		StorageID     func(childComplexity int) int
		Type          func(childComplexity int) int
		Urls          func(childComplexity int) int
		Used          func(childComplexity int) int
		Weight        func(childComplexity int) int
	}

	StorageStats struct {
		TotalAvailable   func(childComplexity int) int
		TotalCapacity    func(childComplexity int) int
		TotalFsAvailable func(childComplexity int) int
		TotalReserved    func(childComplexity int) int
		TotalUsed        func(childComplexity int) int
		Type             func(childComplexity int) int
	}

	StorageUsage struct {
		Available   func(childComplexity int) int
		FsAvailable func(childComplexity int) int
		Reserved    func(childComplexity int) int
		Time        func(childComplexity int) int
		Used        func(childComplexity int) int
	}

	Subscription struct {
		Alerts        func(childComplexity int, offset int) int
		CompletedTask func(childComplexity int, machine *string, last int) int
		NewTask       func(childComplexity int, machineID *int, last int) int
	}

	Task struct {
		AddedBy        func(childComplexity int) int
		AddedByID      func(childComplexity int) int
		Histories      func(childComplexity int) int
		ID             func(childComplexity int) int
		InitiatedBy    func(childComplexity int) int
		InitiatedByID  func(childComplexity int) int
		Name           func(childComplexity int) int
		Owner          func(childComplexity int) int
		OwnerID        func(childComplexity int) int
		PostedTime     func(childComplexity int) int
		PreviousTask   func(childComplexity int) int
		PreviousTaskID func(childComplexity int) int
		UpdateTime     func(childComplexity int) int
	}

	TaskAggregate struct {
		Failure func(childComplexity int) int
		Success func(childComplexity int) int
		Tasks   func(childComplexity int) int
		Time    func(childComplexity int) int
		Total   func(childComplexity int) int
	}

	TaskHistory struct {
		CompletedBy            func(childComplexity int) int
		CompletedByHostAndPort func(childComplexity int) int
		Err                    func(childComplexity int) int
		ID                     func(childComplexity int) int
		Name                   func(childComplexity int) int
		Posted                 func(childComplexity int) int
		Result                 func(childComplexity int) int
		TaskID                 func(childComplexity int) int
		WorkEnd                func(childComplexity int) int
		WorkStart              func(childComplexity int) int
	}

	TaskNameAggregate struct {
		Failure func(childComplexity int) int
		Name    func(childComplexity int) int
		Success func(childComplexity int) int
		Total   func(childComplexity int) int
	}

	TaskSummary struct {
		FalseCount func(childComplexity int) int
		Name       func(childComplexity int) int
		TotalCount func(childComplexity int) int
		TrueCount  func(childComplexity int) int
	}

	TaskSummaryDay struct {
		Day        func(childComplexity int) int
		FalseCount func(childComplexity int) int
		TotalCount func(childComplexity int) int
		TrueCount  func(childComplexity int) int
	}
}

type Config

type Config struct {
	Schema     *ast.Schema
	Resolvers  ResolverRoot
	Directives DirectiveRoot
	Complexity ComplexityRoot
}

type ConfigResolver

type ConfigResolver interface {
	UsedBy(ctx context.Context, obj *model.Config) ([]*model.MachineDetail, error)
}

type DirectiveRoot

type DirectiveRoot struct {
}

type MachineResolver

type MachineResolver interface {
	Detail(ctx context.Context, obj *model.Machine) (*model.MachineDetail, error)
	Tasks(ctx context.Context, obj *model.Machine) ([]*model.Task, error)
	TaskHistories(ctx context.Context, obj *model.Machine, last int) ([]*model.TaskHistory, error)
	Storages(ctx context.Context, obj *model.Machine) ([]*model.StoragePath, error)
	Metrics(ctx context.Context, obj *model.Machine) (*model.MachineMetrics, error)
}

type MachineSummaryResolver

type MachineSummaryResolver interface {
	Total(ctx context.Context, obj *model.MachineSummary) (int, error)
	TotalUp(ctx context.Context, obj *model.MachineSummary) (int, error)
	TotalDown(ctx context.Context, obj *model.MachineSummary) (int, error)
	UniqueHostsTotal(ctx context.Context, obj *model.MachineSummary) (int, error)
	UniqueHostsUp(ctx context.Context, obj *model.MachineSummary) (int, error)
	UniqueHostsDown(ctx context.Context, obj *model.MachineSummary) (int, error)
	TotalRAM(ctx context.Context, obj *model.MachineSummary) (int, error)
	TotalCPU(ctx context.Context, obj *model.MachineSummary) (int, error)
	TotalGpu(ctx context.Context, obj *model.MachineSummary) (float64, error)
}

type MinerResolver

type MinerResolver interface {
	Info(ctx context.Context, obj *model.Miner) (*model.MinerInfo, error)
	Power(ctx context.Context, obj *model.Miner) (*model.MinerPower, error)
	AvailableBalance(ctx context.Context, obj *model.Miner) (*types.BigInt, error)
}

type MutationResolver

type MutationResolver interface {
	CreateConfig(ctx context.Context, title string, config string) (*model.Config, error)
	UpdateConfig(ctx context.Context, title string, config string) (*model.Config, error)
}

type PipelineResolver

type PipelineResolver interface {
	ID(ctx context.Context, obj *model.Pipeline) (string, error)

	Status(ctx context.Context, obj *model.Pipeline) (model.PipelineStatus, error)
	CurrentTask(ctx context.Context, obj *model.Pipeline) (*model.Task, error)
}

type PipelineSummaryResolver

type PipelineSummaryResolver interface {
	Sdr(ctx context.Context, obj *model.PipelineSummary) (int, error)
	Trees(ctx context.Context, obj *model.PipelineSummary) (int, error)
	PrecommitMsg(ctx context.Context, obj *model.PipelineSummary) (int, error)
	WaitSeed(ctx context.Context, obj *model.PipelineSummary) (int, error)
	Porep(ctx context.Context, obj *model.PipelineSummary) (int, error)
	CommitMsg(ctx context.Context, obj *model.PipelineSummary) (int, error)
	Done(ctx context.Context, obj *model.PipelineSummary) (int, error)
	Failed(ctx context.Context, obj *model.PipelineSummary) (int, error)
}

type QueryResolver

type QueryResolver interface {
	Config(ctx context.Context, layer string) (*model.Config, error)
	Configs(ctx context.Context) ([]*model.Config, error)
	Machine(ctx context.Context, id int) (*model.Machine, error)
	Machines(ctx context.Context) ([]*model.Machine, error)
	MachineSummary(ctx context.Context) (*model.MachineSummary, error)
	Task(ctx context.Context, id int) (*model.Task, error)
	Tasks(ctx context.Context) ([]*model.Task, error)
	TasksCount(ctx context.Context) (int, error)
	TaskHistories(ctx context.Context, offset int, limit int) ([]*model.TaskHistory, error)
	TaskHistoriesCount(ctx context.Context, start time.Time, end time.Time, machine *string, name *string, success *bool) (int, error)
	TaskHistoriesAggregate(ctx context.Context, start time.Time, end time.Time, interval model.TaskHistoriesAggregateInterval) ([]*model.TaskAggregate, error)
	StoragePaths(ctx context.Context) ([]*model.StoragePath, error)
	StorageStats(ctx context.Context) ([]*model.StorageStats, error)
	Sectors(ctx context.Context, actor *types.ActorID, sectorNumber *int, offset int, limit int) ([]*model.Sector, error)
	SectorsCount(ctx context.Context, actor *types.ActorID) (int, error)
	Sector(ctx context.Context, actor types.ActorID, sectorNumber int) (*model.Sector, error)
	Actors(ctx context.Context) ([]*model.Actor, error)
	Actor(ctx context.Context, address types.Address) (*model.Actor, error)
	Pipelines(ctx context.Context) ([]*model.Pipeline, error)
	PipelinesSummary(ctx context.Context) ([]*model.PipelineSummary, error)
	NodesInfo(ctx context.Context) ([]*model.NodeInfo, error)
	MiningSummaryByDay(ctx context.Context, start time.Time, end time.Time) ([]*model.MiningSummaryDay, error)
	DealsPending(ctx context.Context) ([]*model.OpenSectorPiece, error)
	Alerts(ctx context.Context) ([]*model.Alert, error)
	MetricsActiveTasks(ctx context.Context, lastDays int, machine *string) ([]*model.MetricsActiveTask, error)
	Miner(ctx context.Context, address types.Address) (*model.Miner, error)
	MinerPower(ctx context.Context, address *types.Address) (*model.MinerPower, error)
}

type Resolver

type Resolver struct{}

type ResolverRoot

type ResolverRoot interface {
	Actor() ActorResolver
	Config() ConfigResolver
	Machine() MachineResolver
	MachineSummary() MachineSummaryResolver
	Miner() MinerResolver
	Mutation() MutationResolver
	Pipeline() PipelineResolver
	PipelineSummary() PipelineSummaryResolver
	Query() QueryResolver
	Sector() SectorResolver
	SectorMeta() SectorMetaResolver
	StoragePath() StoragePathResolver
	Subscription() SubscriptionResolver
	Task() TaskResolver
	TaskAggregate() TaskAggregateResolver
	TaskHistory() TaskHistoryResolver
}

type SectorMetaResolver

type SectorMetaResolver interface {
	ID(ctx context.Context, obj *model.SectorMeta) (string, error)
}

type SectorResolver

type SectorResolver interface {
	ID(ctx context.Context, obj *model.Sector) (string, error)

	Meta(ctx context.Context, obj *model.Sector) (*model.SectorMeta, error)
	Locations(ctx context.Context, obj *model.Sector) ([]*model.SectorLocation, error)
	Pieces(ctx context.Context, obj *model.Sector) ([]*model.SectorMetaPiece, error)
	Tasks(ctx context.Context, obj *model.Sector) ([]*model.Task, error)
	Events(ctx context.Context, obj *model.Sector) ([]*model.TaskHistory, error)
}

type StoragePathResolver added in v0.0.4

type StoragePathResolver interface {
	ID(ctx context.Context, obj *model.StoragePath) (string, error)

	Type(ctx context.Context, obj *model.StoragePath) (model.StorageType, error)
}

type SubscriptionResolver

type SubscriptionResolver interface {
	Alerts(ctx context.Context, offset int) (<-chan *model.Alert, error)
	CompletedTask(ctx context.Context, machine *string, last int) (<-chan *model.TaskHistory, error)
	NewTask(ctx context.Context, machineID *int, last int) (<-chan *model.Task, error)
}

type TaskAggregateResolver

type TaskAggregateResolver interface {
	Tasks(ctx context.Context, obj *model.TaskAggregate) ([]*model.TaskNameAggregate, error)
}

type TaskHistoryResolver added in v0.0.4

type TaskHistoryResolver interface {
	CompletedBy(ctx context.Context, obj *model.TaskHistory) (*model.Machine, error)
}

type TaskResolver

type TaskResolver interface {
	InitiatedBy(ctx context.Context, obj *model.Task) (*model.Machine, error)

	Owner(ctx context.Context, obj *model.Task) (*model.Machine, error)

	AddedBy(ctx context.Context, obj *model.Task) (*model.Machine, error)

	PreviousTask(ctx context.Context, obj *model.Task) (*model.TaskHistory, error)

	Histories(ctx context.Context, obj *model.Task) ([]*model.TaskHistory, error)
}

Directories

Path Synopsis
gen

Jump to

Keyboard shortcuts

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