service

package
v0.0.0-...-4b0d5d3 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2023 License: BSD-2-Clause Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type StockService

type StockService struct {
	*aphgrpc.Service

	stock.UnimplementedStockServiceServer
	// contains filtered or unexported fields
}

StockService is the container for managing stock service definition

func NewStockService

func NewStockService(
	repo repository.StockRepository,
	pub message.Publisher,
	opt ...aphgrpc.Option,
) *StockService

NewStockService is the constructor for creating a new instance of StockService

func (*StockService) CreatePlasmid

func (s *StockService) CreatePlasmid(
	ctx context.Context,
	r *stock.NewPlasmid,
) (*stock.Plasmid, error)

CreatePlasmid handles the creation of a new plasmid

func (*StockService) CreateStrain

func (s *StockService) CreateStrain(
	ctx context.Context,
	r *stock.NewStrain,
) (*stock.Strain, error)

CreateStrain handles the creation of a new strain

func (*StockService) GetPlasmid

func (s *StockService) GetPlasmid(
	ctx context.Context,
	r *stock.StockId,
) (*stock.Plasmid, error)

GetPlasmid handles getting a plasmid by its ID

func (*StockService) GetStrain

func (s *StockService) GetStrain(
	ctx context.Context,
	r *stock.StockId,
) (*stock.Strain, error)

GetStrain handles getting a strain by its ID

func (*StockService) ListPlasmids

ListPlasmids lists all existing plasmids

func (*StockService) ListStrains

func (s *StockService) ListStrains(
	ctx context.Context,
	param *stock.StockParameters,
) (*stock.StrainCollection, error)

ListStrains lists all existing strains

func (*StockService) ListStrainsByIds

func (s *StockService) ListStrainsByIds(
	ctx context.Context,
	r *stock.StockIdList,
) (*stock.StrainList, error)

ListStrainsByIds gets a list of strains from a list of strain identifiers

func (*StockService) LoadPlasmid

func (s *StockService) LoadPlasmid(
	ctx context.Context,
	r *stock.ExistingPlasmid,
) (*stock.Plasmid, error)

LoadPlasmid loads plasmids with existing IDs into the database

func (*StockService) LoadStrain

func (s *StockService) LoadStrain(
	ctx context.Context,
	r *stock.ExistingStrain,
) (*stock.Strain, error)

LoadStock loads strains with existing IDs into the database

func (*StockService) OboJSONFileUpload

func (s *StockService) OboJSONFileUpload(
	stream stock.StockService_OboJSONFileUploadServer,
) error

func (*StockService) RemoveStock

func (s *StockService) RemoveStock(
	ctx context.Context,
	r *stock.StockId,
) (*empty.Empty, error)

RemoveStock removes an existing stock

func (*StockService) UpdatePlasmid

func (s *StockService) UpdatePlasmid(
	ctx context.Context,
	r *stock.PlasmidUpdate,
) (*stock.Plasmid, error)

UpdatePlasmid handles updating an existing plasmid

func (*StockService) UpdateStrain

func (s *StockService) UpdateStrain(
	ctx context.Context,
	r *stock.StrainUpdate,
) (*stock.Strain, error)

UpdateStrain handles updating an existing strain

Jump to

Keyboard shortcuts

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