notificationchannel

package
v0.29.0 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2021 License: Apache-2.0 Imports: 10 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) 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 uuid.UUID) (*Channel, error)

func (*DB) MapToID added in v0.28.0

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

type Store

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

	MapToID(context.Context, *sql.Tx, *Channel) (uuid.UUID, error)
}

type Type

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

func (*Type) Scan

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

Scan handles reading a Type from the DB format

func (Type) Valid added in v0.28.0

func (t Type) Valid() bool

Valid returns true if t is a known Type.

func (Type) Value added in v0.28.0

func (t Type) Value() (driver.Value, error)

Jump to

Keyboard shortcuts

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