Documentation
¶
Index ¶
- Constants
- Variables
- func MockAnnotationSearchResultCollection() *annotation.AnnotationSearchResultCollection
- func MockAnnotationSuggestionCollection() *annotation.AnnotationSuggestionCollection
- func MockBacterialAnnoEntry(id string) *annotation.TaggedAnnotationCollection_Data
- func MockBacterialStrainListAnno() *annotation.TaggedAnnotationCollection
- func MockCharacteristicsAnno() *annotation.TaggedAnnotationCollection
- func MockContentCollection() *content.ContentCollection
- func MockNamesAnno() *annotation.TaggedAnnotationCollection
- func MockPhenoCollectionAnno(tag, id string) *annotation.TaggedAnnotationCollection_Data
- func MockPhenotypeAnno() *annotation.TaggedAnnotationGroupCollection
- func MockPhenotypeListAnno() *annotation.TaggedAnnotationCollection
- func MockPlasmidCollection() *stock.PlasmidCollection
- func MockPlasmidInputWithParams(depositor string) *stock.PlasmidAttributes
- func MockSearchStrainList() *stock.StrainList
- func MockStockSearchResultCollection() *stock.StockSearchResultCollection
- func MockStockSuggestionCollection() *stock.StockSuggestionCollection
- func MockStrain() *stock.Strain
- func MockStrainCollection() *stock.StrainCollection
- func MockStrainInputWithParams(depositor, parent string) *stock.StrainAttributes
- func MockStrainList() *stock.StrainList
- func MockTagAnno(value, tag string) *annotation.TaggedAnnotation
- func MockTagGroupAnno(onto, tag, value string) *annotation.TaggedAnnotationGroup_Data
- func MockTagList(onto, tag, value string) *annotation.TaggedAnnotationCollection_Data
- func MockedAnnotationClient() *clients.TaggedAnnotationServiceClient
- func MockedAuthClient() authentication.LogtoClient
- func MockedCharacteristicsClient() *clients.TaggedAnnotationServiceClient
- func MockedContentClient() *clients.ContentServiceClient
- func MockedGenModClient() *clients.TaggedAnnotationServiceClient
- func MockedGenotypeClient() *clients.TaggedAnnotationServiceClient
- func MockedIdentityClient() *clients.IdentityServiceClient
- func MockedInStockClient() *clients.TaggedAnnotationServiceClient
- func MockedInStockErrorClient() *clients.TaggedAnnotationServiceClient
- func MockedMutMethodClient() *clients.TaggedAnnotationServiceClient
- func MockedNamesClient() *clients.TaggedAnnotationServiceClient
- func MockedNotInStockClient() *clients.TaggedAnnotationServiceClient
- func MockedOrderClient() *clients.OrderServiceClient
- func MockedPermissionClient() *clients.PermissionServiceClient
- func MockedPhenotypeClient() *clients.TaggedAnnotationServiceClient
- func MockedRoleClient() *clients.RoleServiceClient
- func MockedStockClient() *clients.StockServiceClient
- func MockedSysNameAnnoClient() *clients.TaggedAnnotationServiceClient
- func MockedUserClient() *clients.UserServiceClient
- func TestLogger() *logrus.Entry
- type MockRegistry
- func (mr *MockRegistry) AddAPIConnection(key string, conn *grpc.ClientConn)
- func (mr *MockRegistry) AddAPIEndpoint(key, endpoint string)
- func (mr *MockRegistry) AddAuthClient(key string, auth authentication.LogtoClient)
- func (mr *MockRegistry) AddRecord(key, value string)
- func (mr *MockRegistry) AddRepository(key string, st repository.Repository)
- func (mr *MockRegistry) AddS3Client(key string, s3c *minio.Client)
- func (mr *MockRegistry) GetAPIConnection(key string) (conn *grpc.ClientConn)
- func (mr MockRegistry) GetAPIEndpoint(key string) string
- func (mr *MockRegistry) GetAnnotationClient(key string) annotation.TaggedAnnotationServiceClient
- func (mr *MockRegistry) GetAuthClient(key string) authentication.LogtoClient
- func (mr *MockRegistry) GetContentClient(key string) content.ContentServiceClient
- func (mr *MockRegistry) GetFeatAnnotationClient(name string) feature.FeatureAnnotationServiceClient
- func (mr *MockRegistry) GetIdentityClient(key string) identity.IdentityServiceClient
- func (mr *MockRegistry) GetOrderClient(key string) order.OrderServiceClient
- func (mr *MockRegistry) GetPermissionClient(key string) user.PermissionServiceClient
- func (mr *MockRegistry) GetRecord(key string) string
- func (mr MockRegistry) GetRedisRepository(key string) repository.Repository
- func (mr *MockRegistry) GetRoleClient(key string) user.RoleServiceClient
- func (mr *MockRegistry) GetS3Client(key string) *minio.Client
- func (mr *MockRegistry) GetStockClient(key string) stock.StockServiceClient
- func (mr *MockRegistry) GetUserClient(key string) user.UserServiceClient
- func (mr *MockRegistry) ServiceMap() map[string]string
Constants ¶
const (
MockAnnoSearchStrainID = "DBS0235559"
)
Shared fixture literals, named because golangci-lint goconst requires repeated string literals to be declared as constants.
const (
MockStockSearchID = "DBS0236126"
)
MockStockSearchID is the stock_id carried by the search result fixtures below.
Variables ¶
var ( MockSysNameAnno = MockTagAnno(annotatedEntryID, registry.SysnameTag) MockGenModAnno = MockTagAnno("exogenous mutation", registry.MuttypeTag) MockMutMethodAnno = MockTagAnno("Random Insertion", registry.MutmethodTag) )
var ContentTimestamp = timestamppb.New(time.Date(2020, time.January, 1, 1, 0, 0, 0, time.UTC))
var MockContentAttributes = &content.ContentAttributes{ Name: "test-page", Slug: "news-test-page", CreatedBy: createdByEmail, UpdatedBy: updatedByEmail, CreatedAt: ContentTimestamp, UpdatedAt: ContentTimestamp, Content: "test content body", Namespace: "news", }
var MockGenotypeAnno = MockTagAnno( "axeA1,axeB1,axeC1,sadA-[sadA-KO],[pSadA-GFP],bsR,neoR", registry.GenoTag, )
var MockInStockAnno = MockTagAnno(annotatedEntryID, registry.SysnameTag)
var MockOrderAttributes = &order.OrderAttributes{ CreatedAt: timestamppb.Now(), UpdatedAt: timestamppb.Now(), Courier: "USPS", CourierAccount: "123456", Comments: "first order", Payment: "credit", PurchaseOrderNum: "987654", Status: 0, Consumer: "art@vandelayindustries.com", Payer: "george@costanza.com", Purchaser: "thatsgold@jerry.org", Items: []string{"DBS123456"}, }
var MockPlasmidAttributes = &stock.PlasmidAttributes{ CreatedAt: StockTimestamp, UpdatedAt: StockTimestamp, CreatedBy: createdByEmail, UpdatedBy: createdByEmail, Summary: "test summary", EditableSummary: "editable test summary", Genes: []string{"DDB_G0285425"}, Dbxrefs: []string{dbxrefTest}, Publications: []string{"99999"}, ImageMap: "https://eric.dictybase.dev/test.jpg", Sequence: "ABCDEF", Name: plasmidName, }
var MockStrainAttributes = &stock.StrainAttributes{ CreatedAt: StockTimestamp, UpdatedAt: StockTimestamp, CreatedBy: createdByEmail, UpdatedBy: createdByEmail, Summary: "test summary", EditableSummary: "editable test summary", Depositor: "kenny@bania.com", Genes: []string{"DDB_G0285425"}, Dbxrefs: []string{dbxrefTest}, Publications: []string{"99999"}, Label: "test99", Species: "human", Plasmid: plasmidName, Names: []string{"fusilli"}, }
var MockUpdatePlasmidAttributes = &stock.PlasmidAttributes{ CreatedAt: StockTimestamp, UpdatedAt: StockTimestamp, CreatedBy: createdByEmail, UpdatedBy: updatedByEmail, Summary: "updated summary", EditableSummary: "editable updated summary", Depositor: "puddy@nyrangers.com", Genes: []string{"sadA"}, Dbxrefs: []string{dbxrefTest}, Publications: []string{"99999"}, ImageMap: "https://eric.dictybase.dev/test.jpg", Sequence: "ABCDEF", Name: plasmidName, }
var MockUpdateStrainAttributes = &stock.StrainAttributes{ CreatedAt: StockTimestamp, UpdatedAt: StockTimestamp, CreatedBy: createdByEmail, UpdatedBy: updatedByEmail, Summary: "updated summary", EditableSummary: "editable updated summary", Depositor: "puddy@nyrangers.com", Genes: []string{"sadA"}, Dbxrefs: []string{dbxrefTest}, Publications: []string{"99999"}, Label: "test99", Species: "human", Plasmid: plasmidName, Names: []string{"fusilli"}, }
var (
StockTimestamp = timestamppb.New(t)
)
Functions ¶
func MockAnnotationSearchResultCollection ¶
func MockAnnotationSearchResultCollection() *annotation.AnnotationSearchResultCollection
func MockAnnotationSuggestionCollection ¶
func MockAnnotationSuggestionCollection() *annotation.AnnotationSuggestionCollection
func MockBacterialAnnoEntry ¶
func MockBacterialAnnoEntry(id string) *annotation.TaggedAnnotationCollection_Data
MockBacterialAnnoEntry creates one "bacterial food source" annotation entry.
func MockBacterialStrainListAnno ¶
func MockBacterialStrainListAnno() *annotation.TaggedAnnotationCollection
MockBacterialStrainListAnno returns two distinct IDs plus one duplicate to exercise deduplication in the bacterial pipeline. After deduplication: [DBS000001, DBS000002]
func MockCharacteristicsAnno ¶
func MockCharacteristicsAnno() *annotation.TaggedAnnotationCollection
func MockContentCollection ¶
func MockContentCollection() *content.ContentCollection
func MockNamesAnno ¶
func MockNamesAnno() *annotation.TaggedAnnotationCollection
func MockPhenoCollectionAnno ¶
func MockPhenoCollectionAnno( tag, id string, ) *annotation.TaggedAnnotationCollection_Data
MockPhenoCollectionAnno is used to test the ListStrainsWithPhenotype method.
func MockPhenotypeAnno ¶
func MockPhenotypeAnno() *annotation.TaggedAnnotationGroupCollection
func MockPhenotypeListAnno ¶
func MockPhenotypeListAnno() *annotation.TaggedAnnotationCollection
func MockPlasmidCollection ¶
func MockPlasmidCollection() *stock.PlasmidCollection
func MockPlasmidInputWithParams ¶
func MockPlasmidInputWithParams(depositor string) *stock.PlasmidAttributes
func MockSearchStrainList ¶
func MockSearchStrainList() *stock.StrainList
func MockStockSearchResultCollection ¶
func MockStockSearchResultCollection() *stock.StockSearchResultCollection
func MockStockSuggestionCollection ¶
func MockStockSuggestionCollection() *stock.StockSuggestionCollection
func MockStrain ¶
func MockStrainCollection ¶
func MockStrainCollection() *stock.StrainCollection
func MockStrainInputWithParams ¶
func MockStrainInputWithParams( depositor, parent string, ) *stock.StrainAttributes
func MockStrainList ¶
func MockStrainList() *stock.StrainList
func MockTagAnno ¶
func MockTagAnno(value, tag string) *annotation.TaggedAnnotation
func MockTagGroupAnno ¶
func MockTagGroupAnno( onto, tag, value string, ) *annotation.TaggedAnnotationGroup_Data
func MockTagList ¶
func MockTagList( onto, tag, value string, ) *annotation.TaggedAnnotationCollection_Data
func MockedAnnotationClient ¶
func MockedAnnotationClient() *clients.TaggedAnnotationServiceClient
func MockedAuthClient ¶
func MockedAuthClient() authentication.LogtoClient
func MockedCharacteristicsClient ¶
func MockedCharacteristicsClient() *clients.TaggedAnnotationServiceClient
func MockedContentClient ¶
func MockedContentClient() *clients.ContentServiceClient
func MockedGenModClient ¶
func MockedGenModClient() *clients.TaggedAnnotationServiceClient
func MockedGenotypeClient ¶
func MockedGenotypeClient() *clients.TaggedAnnotationServiceClient
func MockedIdentityClient ¶
func MockedIdentityClient() *clients.IdentityServiceClient
func MockedInStockClient ¶
func MockedInStockClient() *clients.TaggedAnnotationServiceClient
func MockedInStockErrorClient ¶
func MockedInStockErrorClient() *clients.TaggedAnnotationServiceClient
MockedInStockErrorClient fails the inventory lookup with an internal error.
func MockedMutMethodClient ¶
func MockedMutMethodClient() *clients.TaggedAnnotationServiceClient
func MockedNamesClient ¶
func MockedNamesClient() *clients.TaggedAnnotationServiceClient
func MockedNotInStockClient ¶
func MockedNotInStockClient() *clients.TaggedAnnotationServiceClient
MockedNotInStockClient answers the inventory lookup with not-found.
func MockedOrderClient ¶
func MockedOrderClient() *clients.OrderServiceClient
func MockedPermissionClient ¶
func MockedPermissionClient() *clients.PermissionServiceClient
func MockedPhenotypeClient ¶
func MockedPhenotypeClient() *clients.TaggedAnnotationServiceClient
func MockedRoleClient ¶
func MockedRoleClient() *clients.RoleServiceClient
func MockedStockClient ¶
func MockedStockClient() *clients.StockServiceClient
func MockedSysNameAnnoClient ¶
func MockedSysNameAnnoClient() *clients.TaggedAnnotationServiceClient
func MockedUserClient ¶
func MockedUserClient() *clients.UserServiceClient
func TestLogger ¶
Types ¶
type MockRegistry ¶
func (*MockRegistry) AddAPIConnection ¶
func (mr *MockRegistry) AddAPIConnection(key string, conn *grpc.ClientConn)
func (*MockRegistry) AddAPIEndpoint ¶
func (mr *MockRegistry) AddAPIEndpoint(key, endpoint string)
func (*MockRegistry) AddAuthClient ¶
func (mr *MockRegistry) AddAuthClient( key string, auth authentication.LogtoClient, )
func (*MockRegistry) AddRecord ¶
func (mr *MockRegistry) AddRecord(key, value string)
func (*MockRegistry) AddRepository ¶
func (mr *MockRegistry) AddRepository(key string, st repository.Repository)
func (*MockRegistry) AddS3Client ¶
func (mr *MockRegistry) AddS3Client(key string, s3c *minio.Client)
func (*MockRegistry) GetAPIConnection ¶
func (mr *MockRegistry) GetAPIConnection(key string) (conn *grpc.ClientConn)
GetAPIClient looks up a client in the hashmap
func (MockRegistry) GetAPIEndpoint ¶
func (mr MockRegistry) GetAPIEndpoint(key string) string
func (*MockRegistry) GetAnnotationClient ¶
func (mr *MockRegistry) GetAnnotationClient( key string, ) annotation.TaggedAnnotationServiceClient
func (*MockRegistry) GetAuthClient ¶
func (mr *MockRegistry) GetAuthClient(key string) authentication.LogtoClient
func (*MockRegistry) GetContentClient ¶
func (mr *MockRegistry) GetContentClient( key string, ) content.ContentServiceClient
func (*MockRegistry) GetFeatAnnotationClient ¶
func (mr *MockRegistry) GetFeatAnnotationClient( name string, ) feature.FeatureAnnotationServiceClient
GetFeatAnnotationClient provides a mock function with given fields: name
func (*MockRegistry) GetIdentityClient ¶
func (mr *MockRegistry) GetIdentityClient( key string, ) identity.IdentityServiceClient
func (*MockRegistry) GetOrderClient ¶
func (mr *MockRegistry) GetOrderClient(key string) order.OrderServiceClient
func (*MockRegistry) GetPermissionClient ¶
func (mr *MockRegistry) GetPermissionClient( key string, ) user.PermissionServiceClient
func (*MockRegistry) GetRecord ¶
func (mr *MockRegistry) GetRecord(key string) string
func (MockRegistry) GetRedisRepository ¶
func (mr MockRegistry) GetRedisRepository(key string) repository.Repository
func (*MockRegistry) GetRoleClient ¶
func (mr *MockRegistry) GetRoleClient(key string) user.RoleServiceClient
func (*MockRegistry) GetS3Client ¶
func (mr *MockRegistry) GetS3Client(key string) *minio.Client
func (*MockRegistry) GetStockClient ¶
func (mr *MockRegistry) GetStockClient(key string) stock.StockServiceClient
func (*MockRegistry) GetUserClient ¶
func (mr *MockRegistry) GetUserClient(key string) user.UserServiceClient
func (*MockRegistry) ServiceMap ¶
func (mr *MockRegistry) ServiceMap() map[string]string