resolver

package
v0.2.1-0...-9c16218 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2020 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthCodePKCEConfig

type AuthCodePKCEConfig struct {
	ClientID              string   // The client identifier to use.
	AuthorizationEndpoint string   // The URL of the authorization endpoint.
	TokenEndpoint         string   // The URL of the token endpoint.
	RedirectEndpoint      string   // The URL of the redirect endpoint.
	Scopes                []string // Recommended scope(s) to request.
}

AuthCodePKCEConfig contains OAuth 2.0 configuration for the Authorization Code Flow with Proof Key for Code Exchange (PKCE).

type BuildInfoResolver

type BuildInfoResolver struct {
	// contains filtered or unexported fields
}

BuildInfoResolver resolves build info.

func (BuildInfoResolver) BuiltAt

func (r BuildInfoResolver) BuiltAt() *graphql.Time

BuiltAt returns the time at which the component was built (if available).

func (BuildInfoResolver) Compiler

func (r BuildInfoResolver) Compiler() string

Compiler returns the name of the compiler toolchain that built the component.

func (BuildInfoResolver) GitCommit

func (r BuildInfoResolver) GitCommit() *string

GitCommit returns the specific git commit the component was built from (if available).

func (BuildInfoResolver) GitTreeState

func (r BuildInfoResolver) GitTreeState() *string

GitTreeState returns the clean/dirty state of the git tree the component was built from (if available).

func (BuildInfoResolver) GitVersion

GitVersion returns Semantic version info (if available).

func (BuildInfoResolver) GoVersion

func (r BuildInfoResolver) GoVersion() string

GoVersion returns the version of Go the component utilizes.

func (BuildInfoResolver) Platform

func (r BuildInfoResolver) Platform() string

Platform returns the operating system and architecture of the component.

type BuildInfoServicer

type BuildInfoServicer interface {
	GetBuildInfo(ctx context.Context) (core.BuildInfo, error)
}

BuildInfoServicer is the interface by which build info is retrieved.

type ClientCredentialsConfig

type ClientCredentialsConfig struct {
	TokenEndpoint string   // The URL of the token endpoint.
	Scopes        []string // Recommended scope(s) to request.
}

ClientCredentialsConfig contains OAuth 2.0 configuration for the Client Credentials Flow.

type JobConnectionResolver

type JobConnectionResolver struct {
	// contains filtered or unexported fields
}

JobConnectionResolver resolves a job connection.

func (*JobConnectionResolver) Edges

func (r *JobConnectionResolver) Edges() *[]*JobEdgeResolver

Edges resolves a list of edges.

func (*JobConnectionResolver) PageInfo

func (r *JobConnectionResolver) PageInfo() *PageInfoResolver

PageInfo resolves information to aid in pagination.

func (*JobConnectionResolver) TotalCount

func (r *JobConnectionResolver) TotalCount() int32

TotalCount resolves the total count of items in the connection.

type JobEdgeResolver

type JobEdgeResolver struct {
	// contains filtered or unexported fields
}

JobEdgeResolver resolves a job edge.

func (*JobEdgeResolver) Cursor

func (r *JobEdgeResolver) Cursor() string

Cursor resolves a cursor for use in pagination.

func (*JobEdgeResolver) Node

func (r *JobEdgeResolver) Node() *JobResolver

Node resolves the item at the end of the edge.

type JobResolver

type JobResolver struct {
	// contains filtered or unexported fields
}

JobResolver resolves a job.

func (*JobResolver) Command

func (r *JobResolver) Command() []string

Command resolves the job command.

func (*JobResolver) CreatedAt

func (r *JobResolver) CreatedAt() graphql.Time

CreatedAt resolves when the job was created.

func (*JobResolver) CreatedBy

func (r *JobResolver) CreatedBy(ctx context.Context) (*UserResolver, error)

CreatedBy resolves the user who created the job.

func (*JobResolver) ExitCode

func (r *JobResolver) ExitCode() *int32

ExitCode resolves the exit status process that ran the job.

func (*JobResolver) FinishedAt

func (r *JobResolver) FinishedAt() *graphql.Time

FinishedAt returns when the job finished, if it has finished.

func (*JobResolver) ID

func (r *JobResolver) ID() graphql.ID

ID resolves the job ID.

func (*JobResolver) Image

func (r *JobResolver) Image() string

Image resolves the job image.

func (*JobResolver) Name

func (r *JobResolver) Name() string

Name resolves the job name.

func (*JobResolver) Output

func (r *JobResolver) Output() (string, error)

Output resolves the captured Stdout/Stderr of the job.

func (*JobResolver) Requires

func (r *JobResolver) Requires(ctx context.Context, args pageArgs) (*JobConnectionResolver, error)

Requires looks up jobs that need to be executed before the current one.

func (*JobResolver) StartedAt

func (r *JobResolver) StartedAt() *graphql.Time

StartedAt returns when the job started, if it has started.

func (*JobResolver) Status

func (r *JobResolver) Status() string

Status resolves the state of the job.

type OAuth2Configuration

type OAuth2Configuration struct {
	AuthCodePKCE      *AuthCodePKCEConfig      // Configuration for Authorization Code Flow with Proof Key for Code Exchange (if supported).
	ClientCredentials *ClientCredentialsConfig // Configuration for Client Credentials Flow (if supported).
}

OAuth2Configuration represents OAuth 2.0 configuration.

type PageInfoResolver

type PageInfoResolver struct {
	// contains filtered or unexported fields
}

PageInfoResolver resolves information about pagination in a connection.

func (*PageInfoResolver) EndCursor

func (r *PageInfoResolver) EndCursor() *string

EndCursor resolves the cursor to continue when paginating forwards.

func (*PageInfoResolver) HasNextPage

func (r *PageInfoResolver) HasNextPage() bool

HasNextPage resolves whether there are more items when paginating forwards.

func (*PageInfoResolver) HasPreviousPage

func (r *PageInfoResolver) HasPreviousPage() bool

HasPreviousPage resolves whether there are more items when paginating backwards.

func (*PageInfoResolver) StartCursor

func (r *PageInfoResolver) StartCursor() *string

StartCursor resolves the cursor to continue when paginating backwards.

type Resolver

type Resolver struct {
	// contains filtered or unexported fields
}

Resolver is the root type for resolving GraphQL queries.

func New

New creates a new GraphQL resolver.

func (Resolver) CreateWorkflow

func (r Resolver) CreateWorkflow(ctx context.Context, args struct {
	Spec core.WorkflowSpec
}) (*WorkflowResolver, error)

CreateWorkflow creates a new workflow.

func (Resolver) DeleteWorkflow

func (r Resolver) DeleteWorkflow(ctx context.Context, args struct {
	ID string
}) (*WorkflowResolver, error)

DeleteWorkflow deletes a workflow.

func (Resolver) OAuth2Config

func (r Resolver) OAuth2Config() OAuth2Configuration

OAuth2Config returns OAuth 2.0 configuration.

func (Resolver) ServerBuildInfo

func (r Resolver) ServerBuildInfo(ctx context.Context) (BuildInfoResolver, error)

ServerBuildInfo returns a server build info.

func (Resolver) Viewer

func (r Resolver) Viewer(ctx context.Context) (*UserResolver, error)

Viewer returns the currently authenticated user.

func (Resolver) Workflow

func (r Resolver) Workflow(ctx context.Context, args struct {
	ID string
}) (*WorkflowResolver, error)

Workflow returns a workflow resolver.

type SemanticVersionResolver

type SemanticVersionResolver struct {
	// contains filtered or unexported fields
}

SemanticVersionResolver resolves version information

func (SemanticVersionResolver) BuildMetadata

func (r SemanticVersionResolver) BuildMetadata() *string

BuildMetadata returns build metadata.

func (SemanticVersionResolver) Major

func (r SemanticVersionResolver) Major() int32

Major returns the major version.

func (SemanticVersionResolver) Minor

func (r SemanticVersionResolver) Minor() int32

Minor returns the minor version.

func (SemanticVersionResolver) Patch

func (r SemanticVersionResolver) Patch() int32

Patch returns the patch version.

func (SemanticVersionResolver) PreRelease

func (r SemanticVersionResolver) PreRelease() *string

PreRelease returns pre-release info.

type Servicer

type Servicer interface {
	BuildInfoServicer
	UserServicer
	WorkflowServicer
}

Servicer is the interface required to service GraphQL queries.

type UserResolver

type UserResolver struct {
	// contains filtered or unexported fields
}

UserResolver resolves a user.

func (*UserResolver) ID

func (r *UserResolver) ID() graphql.ID

ID resolves the unique user ID.

func (*UserResolver) Jobs

func (r *UserResolver) Jobs(ctx context.Context, args pageArgs) (*JobConnectionResolver, error)

Jobs looks up jobs associated with the user.

func (*UserResolver) Login

func (r *UserResolver) Login() string

Login resolves the username used to login.

func (*UserResolver) Volumes

func (r *UserResolver) Volumes(ctx context.Context, args pageArgs) (*VolumeConnectionResolver, error)

Volumes looks up volumes associated with the user.

func (*UserResolver) Workflows

func (r *UserResolver) Workflows(ctx context.Context, args pageArgs) (*WorkflowConnectionResolver, error)

Workflows looks up workflows associated with the user.

type UserServicer

type UserServicer interface {
	Viewer(ctx context.Context) (core.User, error)
}

UserServicer is the interface by which users are serviced.

type VolumeConnectionResolver

type VolumeConnectionResolver struct {
	// contains filtered or unexported fields
}

VolumeConnectionResolver resolves a volume connection.

func (*VolumeConnectionResolver) Edges

Edges resolves a list of edges.

func (*VolumeConnectionResolver) PageInfo

PageInfo resolves information to aid in pagination.

func (*VolumeConnectionResolver) TotalCount

func (r *VolumeConnectionResolver) TotalCount() int32

TotalCount resolves the total count of items in the connection.

type VolumeEdgeResolver

type VolumeEdgeResolver struct {
	// contains filtered or unexported fields
}

VolumeEdgeResolver resolves a volume edge.

func (*VolumeEdgeResolver) Cursor

func (r *VolumeEdgeResolver) Cursor() string

Cursor resolves a cursor for use in pagination.

func (*VolumeEdgeResolver) Node

Node resolves the item at the end of the edge.

type VolumeResolver

type VolumeResolver struct {
	// contains filtered or unexported fields
}

VolumeResolver resolves a volume.

func (*VolumeResolver) ID

func (r *VolumeResolver) ID() graphql.ID

ID resolves the volume ID.

func (*VolumeResolver) Name

func (r *VolumeResolver) Name() string

Name resolves the volume name.

func (*VolumeResolver) Type

func (r *VolumeResolver) Type() string

Type resolves the volume type.

type WorkflowConnectionResolver

type WorkflowConnectionResolver struct {
	// contains filtered or unexported fields
}

WorkflowConnectionResolver resolves a workflow connection.

func (*WorkflowConnectionResolver) Edges

Edges resolves a list of edges.

func (*WorkflowConnectionResolver) PageInfo

PageInfo resolves information to aid in pagination.

func (*WorkflowConnectionResolver) TotalCount

func (r *WorkflowConnectionResolver) TotalCount() int32

TotalCount resolves the total count of items in the connection.

type WorkflowEdgeResolver

type WorkflowEdgeResolver struct {
	// contains filtered or unexported fields
}

WorkflowEdgeResolver resolves a workflow edge.

func (*WorkflowEdgeResolver) Cursor

func (r *WorkflowEdgeResolver) Cursor() string

Cursor resolves a cursor for use in pagination.

func (*WorkflowEdgeResolver) Node

Node resolves the item at the end of the edge.

type WorkflowResolver

type WorkflowResolver struct {
	// contains filtered or unexported fields
}

WorkflowResolver resolves a workflow.

func (*WorkflowResolver) CreatedAt

func (r *WorkflowResolver) CreatedAt() graphql.Time

CreatedAt resolves when the workflow was created.

func (*WorkflowResolver) CreatedBy

func (r *WorkflowResolver) CreatedBy(ctx context.Context) (*UserResolver, error)

CreatedBy resolves the user who created the workflow.

func (*WorkflowResolver) FinishedAt

func (r *WorkflowResolver) FinishedAt() *graphql.Time

FinishedAt returns when the workflow finished, if it has finished.

func (*WorkflowResolver) ID

func (r *WorkflowResolver) ID() graphql.ID

ID resolves the workflow ID.

func (*WorkflowResolver) Jobs

func (r *WorkflowResolver) Jobs(ctx context.Context, args pageArgs) (*JobConnectionResolver, error)

Jobs looks up jobs associated with the workflow.

func (*WorkflowResolver) Name

func (r *WorkflowResolver) Name() string

Name resolves the workflow name.

func (*WorkflowResolver) StartedAt

func (r *WorkflowResolver) StartedAt() *graphql.Time

StartedAt returns when the workflow started, if it has started.

func (*WorkflowResolver) Status

func (r *WorkflowResolver) Status() string

Status resolves the state of the workflow.

func (*WorkflowResolver) Volumes

func (r *WorkflowResolver) Volumes(ctx context.Context, args pageArgs) (*VolumeConnectionResolver, error)

Volumes looks up volumes associated with the workflow.

type WorkflowServicer

type WorkflowServicer interface {
	CreateWorkflow(context.Context, core.WorkflowSpec) (core.Workflow, error)
	DeleteWorkflow(context.Context, string) (core.Workflow, error)
	GetWorkflow(context.Context, string) (core.Workflow, error)
}

WorkflowServicer is the interface by which workflows are serviced.

Jump to

Keyboard shortcuts

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