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 { Beacon struct { AgentIdentifier func(childComplexity int) int CreatedAt func(childComplexity int) int Host func(childComplexity int) int ID func(childComplexity int) int Identifier func(childComplexity int) int Interval func(childComplexity int) int LastModifiedAt func(childComplexity int) int LastSeenAt func(childComplexity int) int Name func(childComplexity int) int Principal func(childComplexity int) int Tasks func(childComplexity int) int } File struct { CreatedAt func(childComplexity int) int Hash func(childComplexity int) int ID func(childComplexity int) int LastModifiedAt func(childComplexity int) int Name func(childComplexity int) int Size func(childComplexity int) int Tomes func(childComplexity int) int } Host struct { Beacons func(childComplexity int) int CreatedAt func(childComplexity int) int Credentials func(childComplexity int) int Files func(childComplexity int) int ID func(childComplexity int) int Identifier func(childComplexity int) int LastModifiedAt func(childComplexity int) int LastSeenAt func(childComplexity int) int Name func(childComplexity int) int Platform func(childComplexity int) int PrimaryIP func(childComplexity int) int Processes func(childComplexity int) int Tags func(childComplexity int) int } HostCredential struct { CreatedAt func(childComplexity int) int Host func(childComplexity int) int ID func(childComplexity int) int Kind func(childComplexity int) int LastModifiedAt func(childComplexity int) int Principal func(childComplexity int) int Secret func(childComplexity int) int Task func(childComplexity int) int } HostFile struct { CreatedAt func(childComplexity int) int Group func(childComplexity int) int Hash func(childComplexity int) int Host func(childComplexity int) int ID func(childComplexity int) int LastModifiedAt func(childComplexity int) int Owner func(childComplexity int) int Path func(childComplexity int) int Permissions func(childComplexity int) int Size func(childComplexity int) int Task func(childComplexity int) int } HostProcess struct { Cmd func(childComplexity int) int CreatedAt func(childComplexity int) int Cwd func(childComplexity int) int Env func(childComplexity int) int Host func(childComplexity int) int ID func(childComplexity int) int LastModifiedAt func(childComplexity int) int Name func(childComplexity int) int Path func(childComplexity int) int Pid func(childComplexity int) int Ppid func(childComplexity int) int Principal func(childComplexity int) int Status func(childComplexity int) int Task func(childComplexity int) int } Mutation struct { CreateQuest func(childComplexity int, beaconIDs []int, input ent.CreateQuestInput) int CreateRepository func(childComplexity int, input ent.CreateRepositoryInput) int CreateTag func(childComplexity int, input ent.CreateTagInput) int CreateTome func(childComplexity int, input ent.CreateTomeInput) int DeleteTome func(childComplexity int, tomeID int) int DropAllData func(childComplexity int) int ImportRepository func(childComplexity int, repoID int, input *models.ImportRepositoryInput) int UpdateBeacon func(childComplexity int, beaconID int, input ent.UpdateBeaconInput) int UpdateHost func(childComplexity int, hostID int, input ent.UpdateHostInput) int UpdateTag func(childComplexity int, tagID int, input ent.UpdateTagInput) int UpdateTome func(childComplexity int, tomeID int, input ent.UpdateTomeInput) int UpdateUser func(childComplexity int, userID int, input ent.UpdateUserInput) int } PageInfo struct { EndCursor func(childComplexity int) int HasNextPage func(childComplexity int) int HasPreviousPage func(childComplexity int) int StartCursor func(childComplexity int) int } Query struct { Beacons func(childComplexity int, where *ent.BeaconWhereInput) int Files func(childComplexity int, where *ent.FileWhereInput) int Hosts func(childComplexity int, where *ent.HostWhereInput) int Me func(childComplexity int) int Node func(childComplexity int, id int) int Nodes func(childComplexity int, ids []int) int Quests func(childComplexity int, after *entgql.Cursor[int], first *int, before *entgql.Cursor[int], last *int, orderBy []*ent.QuestOrder, where *ent.QuestWhereInput) int Repositories func(childComplexity int, after *entgql.Cursor[int], first *int, before *entgql.Cursor[int], last *int, orderBy []*ent.RepositoryOrder, where *ent.RepositoryWhereInput) int Tags func(childComplexity int, where *ent.TagWhereInput) int Tasks func(childComplexity int, after *entgql.Cursor[int], first *int, before *entgql.Cursor[int], last *int, orderBy []*ent.TaskOrder, where *ent.TaskWhereInput) int Tomes func(childComplexity int, where *ent.TomeWhereInput) int Users func(childComplexity int, where *ent.UserWhereInput) int } Quest struct { Bundle func(childComplexity int) int CreatedAt func(childComplexity int) int Creator func(childComplexity int) int EldritchAtCreation func(childComplexity int) int ID func(childComplexity int) int LastModifiedAt func(childComplexity int) int Name func(childComplexity int) int ParamDefsAtCreation func(childComplexity int) int Parameters func(childComplexity int) int Tasks func(childComplexity int) int Tome func(childComplexity int) int } QuestConnection struct { Edges func(childComplexity int) int PageInfo func(childComplexity int) int TotalCount func(childComplexity int) int } QuestEdge struct { Cursor func(childComplexity int) int Node func(childComplexity int) int } Repository struct { CreatedAt func(childComplexity int) int ID func(childComplexity int) int LastImportedAt func(childComplexity int) int LastModifiedAt func(childComplexity int) int Owner func(childComplexity int) int PublicKey func(childComplexity int) int Tomes func(childComplexity int) int URL func(childComplexity int) int } RepositoryConnection struct { Edges func(childComplexity int) int PageInfo func(childComplexity int) int TotalCount func(childComplexity int) int } RepositoryEdge struct { Cursor func(childComplexity int) int Node func(childComplexity int) int } Tag struct { Hosts func(childComplexity int) int ID func(childComplexity int) int Kind func(childComplexity int) int Name func(childComplexity int) int } Task struct { Beacon func(childComplexity int) int ClaimedAt func(childComplexity int) int CreatedAt func(childComplexity int) int Error func(childComplexity int) int ExecFinishedAt func(childComplexity int) int ExecStartedAt func(childComplexity int) int ID func(childComplexity int) int LastModifiedAt func(childComplexity int) int Output func(childComplexity int) int OutputSize func(childComplexity int) int Quest func(childComplexity int) int ReportedCredentials func(childComplexity int) int ReportedFiles func(childComplexity int) int ReportedProcesses func(childComplexity int) int } TaskConnection struct { Edges func(childComplexity int) int PageInfo func(childComplexity int) int TotalCount func(childComplexity int) int } TaskEdge struct { Cursor func(childComplexity int) int Node func(childComplexity int) int } Tome struct { Author func(childComplexity int) int CreatedAt func(childComplexity int) int Description func(childComplexity int) int Eldritch func(childComplexity int) int Files func(childComplexity int) int ID func(childComplexity int) int LastModifiedAt func(childComplexity int) int Name func(childComplexity int) int ParamDefs func(childComplexity int) int Repository func(childComplexity int) int SupportModel func(childComplexity int) int Tactic func(childComplexity int) int Uploader func(childComplexity int) int } User struct { ID func(childComplexity int) int IsActivated func(childComplexity int) int IsAdmin func(childComplexity int) int Name func(childComplexity int) int PhotoURL func(childComplexity int) int Tomes func(childComplexity int) int } }
type Config ¶
type Config struct { Schema *ast.Schema Resolvers ResolverRoot Directives DirectiveRoot Complexity ComplexityRoot }
type DirectiveRoot ¶
type MutationResolver ¶
type MutationResolver interface { DropAllData(ctx context.Context) (bool, error) CreateQuest(ctx context.Context, beaconIDs []int, input ent.CreateQuestInput) (*ent.Quest, error) UpdateBeacon(ctx context.Context, beaconID int, input ent.UpdateBeaconInput) (*ent.Beacon, error) UpdateHost(ctx context.Context, hostID int, input ent.UpdateHostInput) (*ent.Host, error) CreateTag(ctx context.Context, input ent.CreateTagInput) (*ent.Tag, error) UpdateTag(ctx context.Context, tagID int, input ent.UpdateTagInput) (*ent.Tag, error) CreateTome(ctx context.Context, input ent.CreateTomeInput) (*ent.Tome, error) UpdateTome(ctx context.Context, tomeID int, input ent.UpdateTomeInput) (*ent.Tome, error) DeleteTome(ctx context.Context, tomeID int) (int, error) CreateRepository(ctx context.Context, input ent.CreateRepositoryInput) (*ent.Repository, error) ImportRepository(ctx context.Context, repoID int, input *models.ImportRepositoryInput) (*ent.Repository, error) UpdateUser(ctx context.Context, userID int, input ent.UpdateUserInput) (*ent.User, error) }
type QueryResolver ¶
type QueryResolver interface { Node(ctx context.Context, id int) (ent.Noder, error) Nodes(ctx context.Context, ids []int) ([]ent.Noder, error) Files(ctx context.Context, where *ent.FileWhereInput) ([]*ent.File, error) Quests(ctx context.Context, after *entgql.Cursor[int], first *int, before *entgql.Cursor[int], last *int, orderBy []*ent.QuestOrder, where *ent.QuestWhereInput) (*ent.QuestConnection, error) Tasks(ctx context.Context, after *entgql.Cursor[int], first *int, before *entgql.Cursor[int], last *int, orderBy []*ent.TaskOrder, where *ent.TaskWhereInput) (*ent.TaskConnection, error) Repositories(ctx context.Context, after *entgql.Cursor[int], first *int, before *entgql.Cursor[int], last *int, orderBy []*ent.RepositoryOrder, where *ent.RepositoryWhereInput) (*ent.RepositoryConnection, error) Beacons(ctx context.Context, where *ent.BeaconWhereInput) ([]*ent.Beacon, error) Hosts(ctx context.Context, where *ent.HostWhereInput) ([]*ent.Host, error) Tags(ctx context.Context, where *ent.TagWhereInput) ([]*ent.Tag, error) Tomes(ctx context.Context, where *ent.TomeWhereInput) ([]*ent.Tome, error) Users(ctx context.Context, where *ent.UserWhereInput) ([]*ent.User, error) Me(ctx context.Context) (*ent.User, error) }
type ResolverRoot ¶
type ResolverRoot interface { Mutation() MutationResolver Query() QueryResolver }
Click to show internal directories.
Click to hide internal directories.