notificationchannel

package
v0.23.0 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2019 License: Apache-2.0 Imports: 9 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Channel

type Channel struct {
	ID    string
	Name  string
	Type  Type
	Value string
}

func (Channel) Normalize

func (c Channel) Normalize() (*Channel, error)

type DB

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

func NewDB

func NewDB(ctx context.Context, db *sql.DB) (*DB, error)

func (*DB) CreateTx

func (db *DB) CreateTx(ctx context.Context, tx *sql.Tx, c *Channel) (*Channel, error)

func (*DB) DeleteManyTx

func (db *DB) DeleteManyTx(ctx context.Context, tx *sql.Tx, ids []string) error

func (*DB) FindAll

func (db *DB) FindAll(ctx context.Context) ([]Channel, error)

func (*DB) FindOne

func (db *DB) FindOne(ctx context.Context, id string) (*Channel, error)

type Store

type Store interface {
	FindAll(context.Context) ([]Channel, error)
	FindOne(context.Context, string) (*Channel, error)
	CreateTx(context.Context, *sql.Tx, *Channel) (*Channel, error)
	DeleteManyTx(context.Context, *sql.Tx, []string) error
}

type Type

type Type string
const (
	TypeSlack Type = "SLACK"
)

func (Type) DestType

func (t Type) DestType() notification.DestType

func (*Type) Scan

func (r *Type) Scan(value interface{}) error

Scan handles reading a Type from the DB format

Jump to

Keyboard shortcuts

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