sqlite

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

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

Go to latest
Published: Oct 20, 2025 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func OpenDB

func OpenDB(dbPath string) (*sql.DB, error)

OpenDB opens a SQLite connection.

Types

type ActorService

type ActorService struct {
	// contains filtered or unexported fields
}

ActorService represents a service for managing actors.

func NewActorService

func NewActorService(db *sql.DB) *ActorService

NewActorService creates a new instance.

func (*ActorService) CreateActor

func (s *ActorService) CreateActor(
	ctx context.Context,
	actor *domain.Actor,
) (int64, error)

CreateActor creates a new actor.

func (*ActorService) GetActor

func (s *ActorService) GetActor(
	ctx context.Context,
	params *domain.GetActorParams,
) (*domain.Actor, error)

GetActor gets an actor. Returns ErrNotFound if the actor doesn't exist

func (*ActorService) ListActors

func (s *ActorService) ListActors(
	ctx context.Context,
	params *domain.ListActorsParams,
) (*domain.Actors, error)

ListActors lists actors.

func (*ActorService) RemoveActor

func (s *ActorService) RemoveActor(ctx context.Context, params *domain.RemoveActorParams) (int64, error)

RemoveActor removes an actor. Returns ErrNotFound if the actor doesn't exist

func (*ActorService) UpdateActor

func (s *ActorService) UpdateActor(ctx context.Context, actor *domain.Actor) (int64, error)

UpdateActor updates an actor. Returns ErrNotFound if the actor doesn't exist

type CustomerService

type CustomerService struct {
	// contains filtered or unexported fields
}

CustomerService represents a service for managing customers.

func NewCustomerService

func NewCustomerService(db *sql.DB) *CustomerService

NewCustomerService creates a new instance.

func (*CustomerService) CreateCustomer

func (s *CustomerService) CreateCustomer(
	ctx context.Context,
	customer *domain.Customer,
) (int64, error)

CreateCustomer creates a new customer.

func (*CustomerService) GetCustomer

func (s *CustomerService) GetCustomer(
	ctx context.Context,
	params *domain.GetCustomerParams,
) (*domain.Customer, error)

GetCustomer gets a customer. Returns ErrNotFound if the customer doesn't exist

func (*CustomerService) ListCustomers

func (s *CustomerService) ListCustomers(
	ctx context.Context,
	params *domain.ListCustomersParams,
) (*domain.Customers, error)

ListCustomers lists customers.

func (*CustomerService) RemoveCustomer

func (s *CustomerService) RemoveCustomer(
	ctx context.Context,
	params *domain.RemoveCustomerParams,
) (int64, error)

RemoveCustomer removes a customer. Returns ErrNotFound if the customer doesn't exist

func (*CustomerService) UpdateCustomer

func (s *CustomerService) UpdateCustomer(
	ctx context.Context,
	customer *domain.Customer,
) (int64, error)

UpdateCustomer updates a customer. Returns ErrNotFound if the customer doesn't exist

Directories

Path Synopsis
gen

Jump to

Keyboard shortcuts

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