generated

package
v0.4.4 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2022 License: AGPL-3.0 Imports: 14 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.

Types

type ComplexityRoot

type ComplexityRoot struct {
	Credential struct {
		Fails     func(childComplexity int) int
		ID        func(childComplexity int) int
		Kind      func(childComplexity int) int
		Principal func(childComplexity int) int
		Secret    func(childComplexity int) int
		Target    func(childComplexity int) int
	}

	Event struct {
		CreationTime func(childComplexity int) int
		Credential   func(childComplexity int) int
		Event        func(childComplexity int) int
		File         func(childComplexity int) int
		ID           func(childComplexity int) int
		Job          func(childComplexity int) int
		Kind         func(childComplexity int) int
		Likers       func(childComplexity int, input *models.Filter) int
		Link         func(childComplexity int) int
		Owner        func(childComplexity int) int
		Service      func(childComplexity int) int
		SvcOwner     func(childComplexity int) int
		Tag          func(childComplexity int) int
		Target       func(childComplexity int) int
		Task         func(childComplexity int) int
		User         func(childComplexity int) int
	}

	File struct {
		ContentType      func(childComplexity int) int
		CreationTime     func(childComplexity int) int
		Hash             func(childComplexity int) int
		ID               func(childComplexity int) int
		LastModifiedTime func(childComplexity int) int
		Links            func(childComplexity int, input *models.Filter) int
		Name             func(childComplexity int) int
		Size             func(childComplexity int) int
	}

	Job struct {
		Content      func(childComplexity int) int
		CreationTime func(childComplexity int) int
		ID           func(childComplexity int) int
		Name         func(childComplexity int) int
		Next         func(childComplexity int) int
		Owner        func(childComplexity int) int
		Prev         func(childComplexity int) int
		Staged       func(childComplexity int) int
		Tags         func(childComplexity int, input *models.Filter) int
		Tasks        func(childComplexity int, input *models.Filter) int
	}

	Link struct {
		Alias          func(childComplexity int) int
		Clicks         func(childComplexity int) int
		ExpirationTime func(childComplexity int) int
		File           func(childComplexity int) int
		ID             func(childComplexity int) int
	}

	Mutation struct {
		ActivateService         func(childComplexity int, input *models.ActivateServiceRequest) int
		ActivateUser            func(childComplexity int, input *models.ActivateUserRequest) int
		AddCredentialForTarget  func(childComplexity int, input *models.AddCredentialForTargetRequest) int
		AddCredentialForTargets func(childComplexity int, input *models.AddCredentialForTargetsRequest) int
		ApplyTagToJob           func(childComplexity int, input *models.ApplyTagRequest) int
		ApplyTagToTargets       func(childComplexity int, input *models.ApplyTagToTargetsRequest) int
		ApplyTagToTask          func(childComplexity int, input *models.ApplyTagRequest) int
		ChangeName              func(childComplexity int, input *models.ChangeNameRequest) int
		ClaimTask               func(childComplexity int, id int) int
		ClaimTasks              func(childComplexity int, input *models.ClaimTasksRequest) int
		CreateJob               func(childComplexity int, input *models.CreateJobRequest) int
		CreateLink              func(childComplexity int, input *models.CreateLinkRequest) int
		CreateTag               func(childComplexity int, input *models.CreateTagRequest) int
		CreateTarget            func(childComplexity int, input *models.CreateTargetRequest) int
		DbWipe                  func(childComplexity int, input *models.EmptyRequest) int
		DeactivateService       func(childComplexity int, input *models.DeactivateServiceRequest) int
		DeactivateUser          func(childComplexity int, input *models.DeactivateUserRequest) int
		DeleteCredential        func(childComplexity int, input *models.DeleteCredentialRequest) int
		DeleteTarget            func(childComplexity int, input *models.DeleteTargetRequest) int
		FailCredential          func(childComplexity int, input *models.FailCredentialRequest) int
		LikeEvent               func(childComplexity int, input *models.LikeEventRequest) int
		MakeAdmin               func(childComplexity int, input *models.MakeAdminRequest) int
		QueueJob                func(childComplexity int, input *models.QueueJobRequest) int
		RemoveAdmin             func(childComplexity int, input *models.RemoveAdminRequest) int
		RemoveTagFromJob        func(childComplexity int, input *models.RemoveTagRequest) int
		RemoveTagFromTarget     func(childComplexity int, input *models.RemoveTagRequest) int
		RemoveTagFromTask       func(childComplexity int, input *models.RemoveTagRequest) int
		SetLinkFields           func(childComplexity int, input *models.SetLinkFieldsRequest) int
		SetServiceConfig        func(childComplexity int, input *models.SetServiceConfigRequest) int
		SetTargetFields         func(childComplexity int, input *models.SetTargetFieldsRequest) int
		SubmitTaskResult        func(childComplexity int, input *models.SubmitTaskResultRequest) int
	}

	Query struct {
		Credential  func(childComplexity int, id int) int
		Credentials func(childComplexity int, input *models.Filter) int
		Event       func(childComplexity int, id int) int
		Events      func(childComplexity int, input *models.Filter) int
		File        func(childComplexity int, id int) int
		Files       func(childComplexity int, input *models.Filter) int
		Job         func(childComplexity int, id int) int
		Jobs        func(childComplexity int, input *models.Filter) int
		Link        func(childComplexity int, id int) int
		Links       func(childComplexity int, input *models.Filter) int
		Me          func(childComplexity int) int
		Service     func(childComplexity int, id int) int
		Services    func(childComplexity int, input *models.Filter) int
		Tag         func(childComplexity int, id int) int
		Tags        func(childComplexity int, input *models.Filter) int
		Target      func(childComplexity int, id int) int
		Targets     func(childComplexity int, input *models.Filter) int
		Task        func(childComplexity int, id int) int
		Tasks       func(childComplexity int, input *models.Filter) int
		User        func(childComplexity int, id int) int
		Users       func(childComplexity int, input *models.Filter) int
	}

	Service struct {
		Config      func(childComplexity int) int
		ID          func(childComplexity int) int
		IsActivated func(childComplexity int) int
		Name        func(childComplexity int) int
		PubKey      func(childComplexity int) int
		Tag         func(childComplexity int) int
	}

	Tag struct {
		ID      func(childComplexity int) int
		Jobs    func(childComplexity int, input *models.Filter) int
		Name    func(childComplexity int) int
		Targets func(childComplexity int, input *models.Filter) int
		Tasks   func(childComplexity int, input *models.Filter) int
	}

	Target struct {
		Credentials func(childComplexity int, input *models.Filter) int
		Hostname    func(childComplexity int) int
		ID          func(childComplexity int) int
		LastSeen    func(childComplexity int) int
		MachineUUID func(childComplexity int) int
		Name        func(childComplexity int) int
		Os          func(childComplexity int) int
		PrimaryIP   func(childComplexity int) int
		PrimaryMAC  func(childComplexity int) int
		PublicIP    func(childComplexity int) int
		Tags        func(childComplexity int, input *models.Filter) int
		Tasks       func(childComplexity int, input *models.Filter) int
	}

	Task struct {
		ClaimTime       func(childComplexity int) int
		Content         func(childComplexity int) int
		Error           func(childComplexity int) int
		ExecStartTime   func(childComplexity int) int
		ExecStopTime    func(childComplexity int) int
		ID              func(childComplexity int) int
		Job             func(childComplexity int) int
		LastChangedTime func(childComplexity int) int
		Output          func(childComplexity int) int
		QueueTime       func(childComplexity int) int
		SessionID       func(childComplexity int) int
		Target          func(childComplexity int) int
	}

	User struct {
		ID          func(childComplexity int) int
		IsActivated func(childComplexity int) int
		IsAdmin     func(childComplexity int) int
		Jobs        func(childComplexity int, input *models.Filter) int
		Name        func(childComplexity int) int
		OAuthID     func(childComplexity int) int
		PhotoURL    func(childComplexity int) int
	}
}

type Config

type Config struct {
	Resolvers  ResolverRoot
	Directives DirectiveRoot
	Complexity ComplexityRoot
}

type CredentialResolver added in v0.2.3

type CredentialResolver interface {
	Kind(ctx context.Context, obj *ent.Credential) (*string, error)

	Target(ctx context.Context, obj *ent.Credential) (*ent.Target, error)
}

type DirectiveRoot

type DirectiveRoot struct {
}

type EventResolver added in v0.3.0

type EventResolver interface {
	Kind(ctx context.Context, obj *ent.Event) (*string, error)
	Job(ctx context.Context, obj *ent.Event) (*ent.Job, error)
	File(ctx context.Context, obj *ent.Event) (*ent.File, error)
	Credential(ctx context.Context, obj *ent.Event) (*ent.Credential, error)
	Link(ctx context.Context, obj *ent.Event) (*ent.Link, error)
	Tag(ctx context.Context, obj *ent.Event) (*ent.Tag, error)
	Target(ctx context.Context, obj *ent.Event) (*ent.Target, error)
	Task(ctx context.Context, obj *ent.Event) (*ent.Task, error)
	User(ctx context.Context, obj *ent.Event) (*ent.User, error)
	Service(ctx context.Context, obj *ent.Event) (*ent.Service, error)
	Event(ctx context.Context, obj *ent.Event) (*ent.Event, error)
	Likers(ctx context.Context, obj *ent.Event, input *models.Filter) ([]*ent.User, error)
	Owner(ctx context.Context, obj *ent.Event) (*ent.User, error)
	SvcOwner(ctx context.Context, obj *ent.Event) (*ent.Service, error)
}

type FileResolver added in v0.2.3

type FileResolver interface {
	Links(ctx context.Context, obj *ent.File, input *models.Filter) ([]*ent.Link, error)
}

type JobResolver

type JobResolver interface {
	Tasks(ctx context.Context, obj *ent.Job, input *models.Filter) ([]*ent.Task, error)
	Tags(ctx context.Context, obj *ent.Job, input *models.Filter) ([]*ent.Tag, error)
	Next(ctx context.Context, obj *ent.Job) (*ent.Job, error)
	Prev(ctx context.Context, obj *ent.Job) (*ent.Job, error)
	Owner(ctx context.Context, obj *ent.Job) (*ent.User, error)
}

type LinkResolver added in v0.2.3

type LinkResolver interface {
	File(ctx context.Context, obj *ent.Link) (*ent.File, error)
}

type MutationResolver

type MutationResolver interface {
	DbWipe(ctx context.Context, input *models.EmptyRequest) (bool, error)
	FailCredential(ctx context.Context, input *models.FailCredentialRequest) (*ent.Credential, error)
	DeleteCredential(ctx context.Context, input *models.DeleteCredentialRequest) (bool, error)
	CreateJob(ctx context.Context, input *models.CreateJobRequest) (*ent.Job, error)
	QueueJob(ctx context.Context, input *models.QueueJobRequest) (*ent.Job, error)
	CreateTag(ctx context.Context, input *models.CreateTagRequest) (*ent.Tag, error)
	ApplyTagToTask(ctx context.Context, input *models.ApplyTagRequest) (*ent.Task, error)
	ApplyTagToTargets(ctx context.Context, input *models.ApplyTagToTargetsRequest) ([]*ent.Target, error)
	ApplyTagToJob(ctx context.Context, input *models.ApplyTagRequest) (*ent.Job, error)
	RemoveTagFromTask(ctx context.Context, input *models.RemoveTagRequest) (*ent.Task, error)
	RemoveTagFromTarget(ctx context.Context, input *models.RemoveTagRequest) (*ent.Target, error)
	RemoveTagFromJob(ctx context.Context, input *models.RemoveTagRequest) (*ent.Job, error)
	CreateTarget(ctx context.Context, input *models.CreateTargetRequest) (*ent.Target, error)
	SetTargetFields(ctx context.Context, input *models.SetTargetFieldsRequest) (*ent.Target, error)
	DeleteTarget(ctx context.Context, input *models.DeleteTargetRequest) (bool, error)
	AddCredentialForTarget(ctx context.Context, input *models.AddCredentialForTargetRequest) (*ent.Target, error)
	AddCredentialForTargets(ctx context.Context, input *models.AddCredentialForTargetsRequest) ([]*ent.Target, error)
	ClaimTasks(ctx context.Context, input *models.ClaimTasksRequest) ([]*ent.Task, error)
	ClaimTask(ctx context.Context, id int) (*ent.Task, error)
	SubmitTaskResult(ctx context.Context, input *models.SubmitTaskResultRequest) (*ent.Task, error)
	CreateLink(ctx context.Context, input *models.CreateLinkRequest) (*ent.Link, error)
	SetLinkFields(ctx context.Context, input *models.SetLinkFieldsRequest) (*ent.Link, error)
	ActivateUser(ctx context.Context, input *models.ActivateUserRequest) (*ent.User, error)
	DeactivateUser(ctx context.Context, input *models.DeactivateUserRequest) (*ent.User, error)
	MakeAdmin(ctx context.Context, input *models.MakeAdminRequest) (*ent.User, error)
	RemoveAdmin(ctx context.Context, input *models.RemoveAdminRequest) (*ent.User, error)
	ChangeName(ctx context.Context, input *models.ChangeNameRequest) (*ent.User, error)
	ActivateService(ctx context.Context, input *models.ActivateServiceRequest) (*ent.Service, error)
	DeactivateService(ctx context.Context, input *models.DeactivateServiceRequest) (*ent.Service, error)
	SetServiceConfig(ctx context.Context, input *models.SetServiceConfigRequest) (*ent.Service, error)
	LikeEvent(ctx context.Context, input *models.LikeEventRequest) (*ent.Event, error)
}

type QueryResolver

type QueryResolver interface {
	Link(ctx context.Context, id int) (*ent.Link, error)
	Links(ctx context.Context, input *models.Filter) ([]*ent.Link, error)
	File(ctx context.Context, id int) (*ent.File, error)
	Files(ctx context.Context, input *models.Filter) ([]*ent.File, error)
	Credential(ctx context.Context, id int) (*ent.Credential, error)
	Credentials(ctx context.Context, input *models.Filter) ([]*ent.Credential, error)
	Job(ctx context.Context, id int) (*ent.Job, error)
	Jobs(ctx context.Context, input *models.Filter) ([]*ent.Job, error)
	Tag(ctx context.Context, id int) (*ent.Tag, error)
	Tags(ctx context.Context, input *models.Filter) ([]*ent.Tag, error)
	Target(ctx context.Context, id int) (*ent.Target, error)
	Targets(ctx context.Context, input *models.Filter) ([]*ent.Target, error)
	Task(ctx context.Context, id int) (*ent.Task, error)
	Tasks(ctx context.Context, input *models.Filter) ([]*ent.Task, error)
	User(ctx context.Context, id int) (*ent.User, error)
	Me(ctx context.Context) (models.Identity, error)
	Users(ctx context.Context, input *models.Filter) ([]*ent.User, error)
	Service(ctx context.Context, id int) (*ent.Service, error)
	Services(ctx context.Context, input *models.Filter) ([]*ent.Service, error)
	Event(ctx context.Context, id int) (*ent.Event, error)
	Events(ctx context.Context, input *models.Filter) ([]*ent.Event, error)
}

type ResolverRoot

type ResolverRoot interface {
	Credential() CredentialResolver
	Event() EventResolver
	File() FileResolver
	Job() JobResolver
	Link() LinkResolver
	Mutation() MutationResolver
	Query() QueryResolver
	Service() ServiceResolver
	Tag() TagResolver
	Target() TargetResolver
	Task() TaskResolver
	User() UserResolver
}

type ServiceResolver added in v0.3.0

type ServiceResolver interface {
	Tag(ctx context.Context, obj *ent.Service) (*ent.Tag, error)
}

type TagResolver

type TagResolver interface {
	Tasks(ctx context.Context, obj *ent.Tag, input *models.Filter) ([]*ent.Task, error)
	Targets(ctx context.Context, obj *ent.Tag, input *models.Filter) ([]*ent.Target, error)
	Jobs(ctx context.Context, obj *ent.Tag, input *models.Filter) ([]*ent.Job, error)
}

type TargetResolver

type TargetResolver interface {
	Os(ctx context.Context, obj *ent.Target) (*string, error)

	Tasks(ctx context.Context, obj *ent.Target, input *models.Filter) ([]*ent.Task, error)
	Tags(ctx context.Context, obj *ent.Target, input *models.Filter) ([]*ent.Tag, error)
	Credentials(ctx context.Context, obj *ent.Target, input *models.Filter) ([]*ent.Credential, error)
}

type TaskResolver

type TaskResolver interface {
	Job(ctx context.Context, obj *ent.Task) (*ent.Job, error)
	Target(ctx context.Context, obj *ent.Task) (*ent.Target, error)
}

type UserResolver added in v0.3.0

type UserResolver interface {
	Jobs(ctx context.Context, obj *ent.User, input *models.Filter) ([]*ent.Job, error)
}

Jump to

Keyboard shortcuts

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