Documentation ¶
Index ¶
- Variables
- func JobToDBModel(j Job) db.Job
- func NewExecutableSchema(cfg Config) graphql.ExecutableSchema
- func TaskToDBModel(m Task) db.Task
- func UserToDBModel(u User) db.User
- type ComplexityRoot
- type Config
- type DirectiveRoot
- type Error
- type Job
- type LoginRes
- type MutationResolver
- type NewTask
- type NewUser
- type QueryResolver
- type Resolver
- type ResolverRoot
- type Status
- type Task
- type Tasks
- type Token
- type User
Constants ¶
This section is empty.
Variables ¶
View Source
var AllStatus = []Status{ StatusStatusless, StatusFailed, StatusNotStarted, StatusRunning, StatusEnded, StatusCanceled, }
Functions ¶
func JobToDBModel ¶
func NewExecutableSchema ¶
func NewExecutableSchema(cfg Config) graphql.ExecutableSchema
NewExecutableSchema creates an ExecutableSchema from the ResolverRoot interface.
func TaskToDBModel ¶
func UserToDBModel ¶
Types ¶
type ComplexityRoot ¶
type ComplexityRoot struct { Error struct { Code func(childComplexity int) int Message func(childComplexity int) int } Job struct { Dataset func(childComplexity int) int DockerImage func(childComplexity int) int Env func(childComplexity int) int } Mutation struct { CreateTask func(childComplexity int, input NewTask) int CreateUser func(childComplexity int, input NewUser) int } Query struct { ListTasks func(childComplexity int) int Login func(childComplexity int, id string, pwd string) int } Task struct { CreatedAt func(childComplexity int) int EndedAt func(childComplexity int) int ID func(childComplexity int) int Job func(childComplexity int) int StartedAt func(childComplexity int) int Status func(childComplexity int) int UserID func(childComplexity int) int } Token struct { Token func(childComplexity int) int UserID func(childComplexity int) int Username func(childComplexity int) int } User struct { Admin func(childComplexity int) int CreatedAt func(childComplexity int) int Email func(childComplexity int) int ID func(childComplexity int) int } }
type Config ¶
type Config struct { Resolvers ResolverRoot Directives DirectiveRoot Complexity ComplexityRoot }
type DirectiveRoot ¶
type DirectiveRoot struct { }
type Error ¶
func (Error) IsLoginRes ¶
func (Error) IsLoginRes()
type Job ¶
type Job struct { DockerImage string `json:"docker_image"` Dataset *string `json:"dataset"` Env []string `json:"env"` }
func JobFromDBModel ¶
type MutationResolver ¶
type QueryResolver ¶
type Resolver ¶
type Resolver struct { Log logger.Logger Dbal db.Dbal Config conf.Configuration ApiHost string ApiPort string Auth auth.Auth }
func (*Resolver) Mutation ¶
func (r *Resolver) Mutation() MutationResolver
Mutation returns MutationResolver implementation.
func (*Resolver) Query ¶
func (r *Resolver) Query() QueryResolver
Query returns QueryResolver implementation.
type ResolverRoot ¶
type ResolverRoot interface { Mutation() MutationResolver Query() QueryResolver }
type Task ¶
type Task struct { ID string `json:"id"` UserID string `json:"user_id"` CreatedAt time.Time `json:"created_at"` StartedAt time.Time `json:"started_at"` EndedAt time.Time `json:"ended_at"` Status Status `json:"status"` Job *Job `json:"job"` }
func TaskFromDBModel ¶
func (*Task) MarshalLogObject ¶
func (t *Task) MarshalLogObject(encoder zapcore.ObjectEncoder) error
type Tasks ¶
type Tasks []*Task
func (Tasks) MarshalLogArray ¶
func (t Tasks) MarshalLogArray(encoder zapcore.ArrayEncoder) error
Source Files ¶
Click to show internal directories.
Click to hide internal directories.