mocks

package
v0.0.0-...-578000c Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2023 License: BSD-2-Clause Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var MockGenModAnno = MockTagAnno("exogenous mutation", registry.MuttypeTag)
View Source
var MockGenotypeAnno = MockTagAnno(
	"axeA1,axeB1,axeC1,sadA-[sadA-KO],[pSadA-GFP],bsR,neoR",
	registry.GenoTag,
)
View Source
var MockInStockAnno = MockTagAnno("DBS0236922", registry.SysnameTag)
View Source
var MockMutMethodAnno = MockTagAnno("Random Insertion", registry.MutmethodTag)
View Source
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"},
}
View Source
var MockPlasmidAttributes = &stock.PlasmidAttributes{
	CreatedAt:       StockTimestamp,
	UpdatedAt:       StockTimestamp,
	CreatedBy:       "art@vandelay.com",
	UpdatedBy:       "art@vandelay.com",
	Summary:         "test summary",
	EditableSummary: "editable test summary",
	Genes:           []string{"DDB_G0285425"},
	Dbxrefs:         []string{"test1"},
	Publications:    []string{"99999"},
	ImageMap:        "https://eric.dictybase.dev/test.jpg",
	Sequence:        "ABCDEF",
	Name:            "pTest",
}
View Source
var MockStrainAttributes = &stock.StrainAttributes{
	CreatedAt:       StockTimestamp,
	UpdatedAt:       StockTimestamp,
	CreatedBy:       "art@vandelay.com",
	UpdatedBy:       "art@vandelay.com",
	Summary:         "test summary",
	EditableSummary: "editable test summary",
	Genes:           []string{"DDB_G0285425"},
	Dbxrefs:         []string{"test1"},
	Publications:    []string{"99999"},
	Label:           "test99",
	Species:         "human",
	Plasmid:         "pTest",
	Names:           []string{"fusilli"},
}
View Source
var MockSysNameAnno = MockTagAnno("DBS0236922", registry.SysnameTag)
View Source
var MockUpdatePlasmidAttributes = &stock.PlasmidAttributes{
	CreatedAt:       StockTimestamp,
	UpdatedAt:       StockTimestamp,
	CreatedBy:       "art@vandelay.com",
	UpdatedBy:       "h.e.@pennypacker.com",
	Summary:         "updated summary",
	EditableSummary: "editable updated summary",
	Depositor:       "puddy@nyrangers.com",
	Genes:           []string{"sadA"},
	Dbxrefs:         []string{"test1"},
	Publications:    []string{"99999"},
	ImageMap:        "https://eric.dictybase.dev/test.jpg",
	Sequence:        "ABCDEF",
	Name:            "pTest",
}
View Source
var MockUpdateStrainAttributes = &stock.StrainAttributes{
	CreatedAt:       StockTimestamp,
	UpdatedAt:       StockTimestamp,
	CreatedBy:       "art@vandelay.com",
	UpdatedBy:       "h.e.@pennypacker.com",
	Summary:         "updated summary",
	EditableSummary: "editable updated summary",
	Depositor:       "puddy@nyrangers.com",
	Genes:           []string{"sadA"},
	Dbxrefs:         []string{"test1"},
	Publications:    []string{"99999"},
	Label:           "test99",
	Species:         "human",
	Plasmid:         "pTest",
	Names:           []string{"fusilli"},
}
View Source
var StockTimestamp = timestamppb.New(t)

Functions

func MockCharacteristicsAnno

func MockCharacteristicsAnno() *annotation.TaggedAnnotationCollection

func MockPhenoCollectionAnno

func MockPhenoCollectionAnno(
	tag, id string,
) *annotation.TaggedAnnotationCollection_Data

MockPhenoCollectionAnno is used to test the ListStrainsWithPhenotype method.

func MockPhenotypeListAnno

func MockPhenotypeListAnno() *annotation.TaggedAnnotationCollection

func MockPlasmidInputWithParams

func MockPlasmidInputWithParams(depositor string) *stock.PlasmidAttributes

func MockStrain

func MockStrain() *stock.Strain

func MockStrainInputWithParams

func MockStrainInputWithParams(
	depositor, parent string,
) *stock.StrainAttributes

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 MockedGenotypeClient

func MockedGenotypeClient() *clients.TaggedAnnotationServiceClient

func MockedIdentityClient

func MockedIdentityClient() *clients.IdentityServiceClient

func MockedInStockClient

func MockedInStockClient() *clients.TaggedAnnotationServiceClient

func MockedMutMethodClient

func MockedMutMethodClient() *clients.TaggedAnnotationServiceClient

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

func TestLogger() *logrus.Entry

Types

type MockRegistry

type MockRegistry struct {
	ConnMap *hashmap.Map
}

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) AddRepository

func (mr *MockRegistry) AddRepository(key string, st repository.Repository)

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) 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) GetRedisRepository

func (mr MockRegistry) GetRedisRepository(key string) repository.Repository

func (*MockRegistry) GetRoleClient

func (mr *MockRegistry) GetRoleClient(key string) user.RoleServiceClient

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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