resolver

package
v0.0.0-...-4300f82 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2024 License: BSD-2-Clause Imports: 37 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Slugify

func Slugify(name string) string

Types

type MutationResolver

type MutationResolver struct {
	registry.Registry
	Logger *logrus.Entry
}

func (*MutationResolver) CreateContent

func (mrs *MutationResolver) CreateContent(
	ctx context.Context,
	input *models.CreateContentInput,
) (*pb.Content, error)

func (*MutationResolver) CreateOrder

func (mrs *MutationResolver) CreateOrder(
	ctx context.Context,
	input *models.CreateOrderInput,
) (*pb.Order, error)

CreateOrder creates a new stock order.

func (*MutationResolver) CreatePermission

func (mrs *MutationResolver) CreatePermission(
	ctx context.Context,
	input *models.CreatePermissionInput,
) (*pb.Permission, error)

func (*MutationResolver) CreatePlasmid

func (mrs *MutationResolver) CreatePlasmid(
	ctx context.Context,
	input *models.CreatePlasmidInput,
) (*models.Plasmid, error)

func (*MutationResolver) CreateRole

func (mrs *MutationResolver) CreateRole(
	ctx context.Context,
	input *models.CreateRoleInput,
) (*pb.Role, error)

func (*MutationResolver) CreateRolePermissionRelationship

func (mrs *MutationResolver) CreateRolePermissionRelationship(
	ctx context.Context,
	roleID string,
	permissionID string,
) (*pb.Role, error)

func (*MutationResolver) CreateStrain

func (mrs *MutationResolver) CreateStrain(
	ctx context.Context,
	input *models.CreateStrainInput,
) (*models.Strain, error)

func (*MutationResolver) CreateUser

func (mrs *MutationResolver) CreateUser(
	ctx context.Context,
	input *models.CreateUserInput,
) (*pb.User, error)

func (*MutationResolver) CreateUserRoleRelationship

func (mrs *MutationResolver) CreateUserRoleRelationship(
	ctx context.Context,
	userID string,
	roleID string,
) (*pb.User, error)

func (*MutationResolver) DeleteContent

func (mrs *MutationResolver) DeleteContent(
	ctx context.Context,
	id string,
) (*models.DeleteContent, error)

func (*MutationResolver) DeletePermission

func (mrs *MutationResolver) DeletePermission(
	ctx context.Context,
	id string,
) (*models.DeletePermission, error)

func (*MutationResolver) DeleteRole

func (mrs *MutationResolver) DeleteRole(
	ctx context.Context,
	id string,
) (*models.DeleteRole, error)

func (*MutationResolver) DeleteStock

func (mrs *MutationResolver) DeleteStock(
	ctx context.Context,
	id string,
) (*models.DeleteStock, error)

func (*MutationResolver) DeleteUser

func (mrs *MutationResolver) DeleteUser(
	ctx context.Context,
	id string,
) (*models.DeleteUser, error)

func (*MutationResolver) Login

func (mrs *MutationResolver) Login(
	ctx context.Context,
	input *models.LoginInput,
) (*pb.Auth, error)

func (*MutationResolver) Logout

func (mrs *MutationResolver) Logout(ctx context.Context) (*models.Logout, error)

func (*MutationResolver) UpdateContent

func (mrs *MutationResolver) UpdateContent(
	ctx context.Context,
	input *models.UpdateContentInput,
) (*pb.Content, error)

func (*MutationResolver) UpdateOrder

func (mrs *MutationResolver) UpdateOrder(
	ctx context.Context,
	id string,
	input *models.UpdateOrderInput,
) (*pb.Order, error)

UpdateOrder updates an existing stock order.

func (*MutationResolver) UpdatePermission

func (mrs *MutationResolver) UpdatePermission(
	ctx context.Context,
	id string,
	input *models.UpdatePermissionInput,
) (*pb.Permission, error)

func (*MutationResolver) UpdatePlasmid

func (mrs *MutationResolver) UpdatePlasmid(
	ctx context.Context,
	id string,
	input *models.UpdatePlasmidInput,
) (*models.Plasmid, error)

func (*MutationResolver) UpdateRole

func (mrs *MutationResolver) UpdateRole(
	ctx context.Context,
	id string,
	input *models.UpdateRoleInput,
) (*pb.Role, error)

func (*MutationResolver) UpdateStrain

func (mrs *MutationResolver) UpdateStrain(
	ctx context.Context,
	id string,
	input *models.UpdateStrainInput,
) (*models.Strain, error)

func (*MutationResolver) UpdateUser

func (mrs *MutationResolver) UpdateUser(
	ctx context.Context,
	id string,
	input *models.UpdateUserInput,
) (*pb.User, error)

func (*MutationResolver) UploadFile

func (mrs *MutationResolver) UploadFile(
	ctx context.Context,
	file graphql.Upload,
) (*models.ImageFile, error)

type QueryResolver

type QueryResolver struct {
	registry.Registry
	Dataloaders dataloader.Retriever
	Logger      *logrus.Entry
}

func (*QueryResolver) AllOrthologs

func (qrs *QueryResolver) AllOrthologs(
	ctx context.Context,
	gene string,
) (*models.Gene, error)

func (*QueryResolver) AllPublications

func (qrs *QueryResolver) AllPublications(
	ctx context.Context,
	gene string,
	limit *int,
	sortBy *string,
) (*models.NumberOfPublicationsWithGene, error)

AllPublications is the resolver for the allPublications field.

func (*QueryResolver) AllStrains

func (qrs *QueryResolver) AllStrains(
	ctx context.Context,
	gene string,
) (*models.Gene, error)

func (*QueryResolver) Content

func (qrs *QueryResolver) Content(
	ctx context.Context,
	id string,
) (*pb.Content, error)

func (*QueryResolver) ContentBySlug

func (qrs *QueryResolver) ContentBySlug(
	ctx context.Context,
	slug string,
) (*pb.Content, error)

func (*QueryResolver) Gene

func (qrs *QueryResolver) Gene(
	ctx context.Context,
	geneID string,
) (*models.Gene, error)

func (*QueryResolver) GeneGeneralInformation

func (qrs *QueryResolver) GeneGeneralInformation(
	ctx context.Context,
	gene string,
) (*models.GeneGeneralInfo, error)

GeneGeneralInformation is the resolver for the geneGeneralInformation field.

func (*QueryResolver) GeneOntologyAnnotation

func (qrs *QueryResolver) GeneOntologyAnnotation(
	ctx context.Context,
	gene string,
) ([]*models.GOAnnotation, error)

func (*QueryResolver) GeneralInformation

func (qrs *QueryResolver) GeneralInformation(
	ctx context.Context,
	gene string,
) (*models.Gene, error)

func (*QueryResolver) GetAssociatedSequnces

func (qrs *QueryResolver) GetAssociatedSequnces(
	ctx context.Context,
	gene string,
) (*models.Gene, error)

GetAssociatedSequnces is the resolver for the getAssociatedSequnces field.

func (qrs *QueryResolver) GetLinks(
	ctx context.Context,
	gene string,
) (*models.Gene, error)

GetLinks is the resolver for the getLinks field.

func (*QueryResolver) GetProteinInformation

func (qrs *QueryResolver) GetProteinInformation(
	ctx context.Context,
	gene string,
) (*models.Gene, error)

GetProteinInformation is the resolver for the getProteinInformation field.

func (*QueryResolver) GetRefreshToken

func (qrs *QueryResolver) GetRefreshToken(
	ctx context.Context,
	token string,
) (*pb.Auth, error)

func (*QueryResolver) ListContentByNamespace

func (qrs *QueryResolver) ListContentByNamespace(
	ctx context.Context,
	namespace string,
) ([]*pb.Content, error)

func (*QueryResolver) ListGeneProductInfo

func (qrs *QueryResolver) ListGeneProductInfo(
	ctx context.Context,
	gene string,
) (*models.Gene, error)

ListGeneProductInfo is the resolver for the listGeneProductInfo field.

func (*QueryResolver) ListOrders

func (qrs *QueryResolver) ListOrders(
	ctx context.Context,
	cursor *int,
	limit *int,
	filter *string,
) (*models.OrderListWithCursor, error)

ListOrders retrieves all orders in the database.

func (*QueryResolver) ListOrganisms

func (qrs *QueryResolver) ListOrganisms(
	ctx context.Context,
) ([]*models.Organism, error)

func (*QueryResolver) ListPermissions

func (qrs *QueryResolver) ListPermissions(
	ctx context.Context,
) ([]*pb.Permission, error)

func (*QueryResolver) ListPlasmids

func (qrs *QueryResolver) ListPlasmids(
	ctx context.Context,
	cursor *int,
	limit *int,
	filter *string,
) (*models.PlasmidListWithCursor, error)

func (*QueryResolver) ListPlasmidsWithAnnotation

func (qrs *QueryResolver) ListPlasmidsWithAnnotation(
	ctx context.Context,
	cursor *int,
	limit *int,
	typeArg string,
	annotation string,
) (*models.PlasmidListWithCursor, error)

func (*QueryResolver) ListPublicationsWithGene

func (qrs *QueryResolver) ListPublicationsWithGene(
	ctx context.Context,
	gene string,
) ([]*models.PublicationWithGene, error)

ListPublicationsWithGene is the resolver for the listPublicationsWithGene field.

func (*QueryResolver) ListRecentGenes

func (qrs *QueryResolver) ListRecentGenes(
	ctx context.Context,
	limit int,
) ([]*models.Gene, error)

ListRecentGenes is the resolver for the listRecentGenes field.

func (*QueryResolver) ListRecentPlasmids

func (qrs *QueryResolver) ListRecentPlasmids(
	ctx context.Context,
	limit int,
) ([]*models.Plasmid, error)

ListRecentPlasmids is the resolver for the listRecentPlasmids field.

func (*QueryResolver) ListRecentPublications

func (qrs *QueryResolver) ListRecentPublications(
	ctx context.Context,
	limit int,
) ([]*models.Publication, error)

ListRecentPublications is the resolver for the listRecentPublications field.

func (*QueryResolver) ListRecentStrains

func (qrs *QueryResolver) ListRecentStrains(
	ctx context.Context,
	limit int,
) ([]*models.Strain, error)

ListRecentStrains is the resolver for the listRecentStrains field.

func (*QueryResolver) ListRoles

func (qrs *QueryResolver) ListRoles(ctx context.Context) ([]*pb.Role, error)

func (*QueryResolver) ListStrains

func (qrs *QueryResolver) ListStrains(ctx context.Context, cursor *int,
	limit *int, filter *models.StrainListFilter,
) (*models.StrainListWithCursor, error)

func (*QueryResolver) ListStrainsWithAnnotation

func (qrs *QueryResolver) ListStrainsWithAnnotation(
	ctx context.Context,
	cursor *int,
	limit *int,
	typeArg string,
	annotation string,
) (*models.StrainListWithCursor, error)

func (*QueryResolver) ListStrainsWithGene

func (qrs *QueryResolver) ListStrainsWithGene(
	ctx context.Context,
	gene string,
) ([]*models.Strain, error)

ListStrainsWithGene is the resolver for the listStrainsWithGene field.

func (*QueryResolver) ListUsers

func (qrs *QueryResolver) ListUsers(
	ctx context.Context,
	pagenum string,
	pagesize string,
	filter string,
) (*models.UserList, error)

func (*QueryResolver) Order

func (qrs *QueryResolver) Order(
	ctx context.Context,
	id string,
) (*pb.Order, error)

Order retrieves an individual order by ID.

func (*QueryResolver) Organism

func (qrs *QueryResolver) Organism(
	ctx context.Context,
	taxonID string,
) (*models.Organism, error)

func (*QueryResolver) Permission

func (qrs *QueryResolver) Permission(
	ctx context.Context,
	id string,
) (*pb.Permission, error)

func (*QueryResolver) Plasmid

func (qrs *QueryResolver) Plasmid(
	ctx context.Context,
	id string,
) (*models.Plasmid, error)

func (*QueryResolver) Publication

func (qrs *QueryResolver) Publication(
	ctx context.Context,
	id string,
) (*models.Publication, error)

Publication is the resolver for getting an individual publication by ID.

func (*QueryResolver) Role

func (qrs *QueryResolver) Role(
	ctx context.Context,
	id string,
) (*pb.Role, error)

func (*QueryResolver) Strain

func (qrs *QueryResolver) Strain(
	ctx context.Context,
	id string,
) (*models.Strain, error)

func (*QueryResolver) User

func (qrs *QueryResolver) User(
	ctx context.Context,
	id string,
) (*pb.User, error)

func (*QueryResolver) UserByEmail

func (qrs *QueryResolver) UserByEmail(
	ctx context.Context,
	email string,
) (*pb.User, error)

type Resolver

type Resolver struct {
	registry.Registry
	Dataloaders dataloader.Retriever
	Logger      *logrus.Entry
}

func NewResolver

func NewResolver(
	nr registry.Registry,
	dl dataloader.Retriever,
	logger *logrus.Entry,
) *Resolver

func (*Resolver) Auth

func (rrs *Resolver) Auth() generated.AuthResolver

func (*Resolver) Author

func (rrs *Resolver) Author() generated.AuthorResolver

func (*Resolver) Content

func (rrs *Resolver) Content() generated.ContentResolver

func (*Resolver) Mutation

func (rrs *Resolver) Mutation() generated.MutationResolver

func (*Resolver) Order

func (rrs *Resolver) Order() generated.OrderResolver

func (*Resolver) Organism

func (rrs *Resolver) Organism() generated.OrganismResolver

func (*Resolver) Permission

func (rrs *Resolver) Permission() generated.PermissionResolver

func (*Resolver) Plasmid

func (rrs *Resolver) Plasmid() generated.PlasmidResolver

func (*Resolver) Query

func (rrs *Resolver) Query() generated.QueryResolver

func (*Resolver) Role

func (rrs *Resolver) Role() generated.RoleResolver

func (*Resolver) Strain

func (rrs *Resolver) Strain() generated.StrainResolver

func (*Resolver) User

func (rrs *Resolver) User() generated.UserResolver

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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