channelcmd

package
v0.0.0-...-76b39a9 Latest Latest
Warning

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

Go to latest
Published: Jan 1, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Default = &Command{}

Functions

func Create

func Create(ctx context.Context, db xsql.DB, channel *Creating) (channels.ID, error)

func CreateMessage

func CreateMessage(ctx context.Context, db xsql.DB, channelCode string, message *CreatingMessage) (channels.MessageID, error)

Types

type Command

type Command struct {
	Repositories *repository.Repositories
}

func (*Command) Create

func (c *Command) Create(ctx context.Context, db xsql.DB, channel *Creating) (channels.ID, error)

func (*Command) CreateMessage

func (c *Command) CreateMessage(ctx context.Context, db xsql.DB, channelCode string, message *CreatingMessage) (channels.MessageID, error)

type Creating

type Creating struct {
	Code string `json:"code"`
}

func (*Creating) ChannelCode

func (c *Creating) ChannelCode() string

type CreatingMessage

type CreatingMessage struct {
	Text string
}

func (*CreatingMessage) MessageText

func (c *CreatingMessage) MessageText() string

Jump to

Keyboard shortcuts

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