repository

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: May 16, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Delivery

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

Delivery is a implementation of hammer.DeliveryRepository

func NewDelivery

func NewDelivery(db *sqlx.DB) Delivery

NewDelivery returns a new Delivery with db connection

func (*Delivery) Find

func (d *Delivery) Find(id string) (hammer.Delivery, error)

Find returns hammer.Delivery by id

func (*Delivery) FindAll

func (d *Delivery) FindAll(findOptions hammer.FindOptions) ([]hammer.Delivery, error)

FindAll returns []hammer.Delivery by limit and offset

func (*Delivery) FindToDispatch

func (d *Delivery) FindToDispatch(limit, offset int) ([]string, error)

FindToDispatch returns []hammer.Delivery ready to dispatch by limit and offset

func (*Delivery) Store

func (d *Delivery) Store(tx hammer.TxRepository, delivery *hammer.Delivery) error

Store a hammer.Delivery on database (create or update)

type DeliveryAttempt

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

DeliveryAttempt is a implementation of hammer.DeliveryAttemptRepository

func NewDeliveryAttempt

func NewDeliveryAttempt(db *sqlx.DB) DeliveryAttempt

NewDeliveryAttempt returns a new DeliveryAttempt with db connection

func (*DeliveryAttempt) Find

Find returns hammer.DeliveryAttempt by id

func (*DeliveryAttempt) FindAll

func (d *DeliveryAttempt) FindAll(findOptions hammer.FindOptions) ([]hammer.DeliveryAttempt, error)

FindAll returns []hammer.DeliveryAttempt by limit and offset

func (*DeliveryAttempt) Store

func (d *DeliveryAttempt) Store(tx hammer.TxRepository, deliveryAttempt *hammer.DeliveryAttempt) error

Store a hammer.DeliveryAttempt on database (create or update)

type Message

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

Message is a implementation of hammer.MessageRepository

func NewMessage

func NewMessage(db *sqlx.DB) Message

NewMessage returns a new Message with db connection

func (*Message) Delete

func (m *Message) Delete(tx hammer.TxRepository, id string) error

Delete a hammer.Message on database

func (*Message) Find

func (m *Message) Find(id string) (hammer.Message, error)

Find returns hammer.Message by id

func (*Message) FindAll

func (m *Message) FindAll(findOptions hammer.FindOptions) ([]hammer.Message, error)

FindAll returns []hammer.Message by limit and offset

func (*Message) Store

func (m *Message) Store(tx hammer.TxRepository, message *hammer.Message) error

Store a hammer.Message on database (create or update)

type Migration

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

Migration is a implementation of hammer.MigrationRepository

func NewMigration

func NewMigration(db *sqlx.DB, migrationDir string) Migration

NewMigration will create a implementation of hammer.MigrationRepository

func (*Migration) Run

func (m *Migration) Run() error

Run migrations

type Subscription

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

Subscription is a implementation of hammer.SubscriptionRepository

func NewSubscription

func NewSubscription(db *sqlx.DB) Subscription

NewSubscription returns a new Subscription with db connection

func (*Subscription) Delete

func (s *Subscription) Delete(tx hammer.TxRepository, id string) error

Delete a hammer.Subscription on database

func (*Subscription) Find

func (s *Subscription) Find(id string) (hammer.Subscription, error)

Find returns hammer.Subscription by id

func (*Subscription) FindAll

func (s *Subscription) FindAll(findOptions hammer.FindOptions) ([]hammer.Subscription, error)

FindAll returns []hammer.Subscription by limit and offset

func (*Subscription) Store

func (s *Subscription) Store(tx hammer.TxRepository, subscription *hammer.Subscription) error

Store a hammer.Subscription on database (create or update)

type Topic

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

Topic is a implementation of hammer.TopicRepository

func NewTopic

func NewTopic(db *sqlx.DB) Topic

NewTopic returns a new Topic with db connection

func (*Topic) Delete

func (t *Topic) Delete(tx hammer.TxRepository, id string) error

Delete a hammer.Topic on database

func (*Topic) Find

func (t *Topic) Find(id string) (hammer.Topic, error)

Find returns hammer.Topic by id

func (*Topic) FindAll

func (t *Topic) FindAll(findOptions hammer.FindOptions) ([]hammer.Topic, error)

FindAll returns []hammer.Topic by limit and offset

func (*Topic) Store

func (t *Topic) Store(tx hammer.TxRepository, topic *hammer.Topic) error

Store a hammer.Topic on database (create or update)

type Tx

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

Tx is a implementation of hammer.TxRepository

func NewTx

func NewTx(tx *sqlx.Tx) Tx

NewTx returns a new Tx with *sql.Tx

func (*Tx) Commit

func (t *Tx) Commit() error

Commit commits the transaction

func (*Tx) Exec

func (t *Tx) Exec(query string, arg interface{}) error

Exec executes a query that doesn't return rows

func (*Tx) Rollback

func (t *Tx) Rollback() error

Rollback aborts the transaction

type TxFactory

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

TxFactory is a implementation of hammer.TxFactoryRepository

func NewTxFactory

func NewTxFactory(db *sqlx.DB) TxFactory

NewTxFactory returns a new TxFactory with db connection

func (*TxFactory) New

func (t *TxFactory) New() (hammer.TxRepository, error)

New returns a hammer.TxRepository

Jump to

Keyboard shortcuts

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