billing_store

package
v0.0.0-...-36d8597 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Billing Service. Infrastructure layer

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccountRepository

type AccountRepository interface {
	Repository

	Get(ctx context.Context, id string) (*v1.Account, error)
	List(ctx context.Context, filter interface{}) ([]*v1.Account, error)
	Add(ctx context.Context, in *v1.Account) (*v1.Account, error)
	Update(ctx context.Context, in *v1.Account) (*v1.Account, error)
	Delete(ctx context.Context, id string) error
}

type BillingStore

type BillingStore struct {

	// Repositories
	Account    AccountRepository
	Tariff     TariffRepository
	EventStore *event_store.Repository

	// Observer interface for subscribe on system event
	notify.Subscriber // Observer interface for subscribe on system event
	// contains filtered or unexported fields
}

Store abstract type

func (*BillingStore) Use

func (s *BillingStore) Use(ctx context.Context, log logger.Logger, db *db.Store) (*BillingStore, error)

Use return implementation of db

type Repository

type Repository interface {
	Init(ctx context.Context, db *db.Store) error
}

type TariffRepository

type TariffRepository interface {
	Repository

	Get(ctx context.Context, id string) (*billing.Tariff, error)
	List(ctx context.Context, filter interface{}) (*billing.Tariffs, error)
	Add(ctx context.Context, in *billing.Tariff) (*billing.Tariff, error)
	Update(ctx context.Context, in *billing.Tariff) (*billing.Tariff, error)
	Delete(ctx context.Context, id string) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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