notificationchannel

package
v0.24.1 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2019 License: Apache-2.0 Imports: 9 Imported by: 0

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