seabird

package module
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2025 License: MIT Imports: 12 Imported by: 8

README

seabird-go

Development

$ go get google.golang.org/protobuf/cmd/protoc-gen-go google.golang.org/grpc/cmd/protoc-gen-go-grpc
$ go generate ./...

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewBlockquoteBlock added in v0.5.0

func NewBlockquoteBlock(inner ...*pb.Block) *pb.Block

func NewBoldBlock added in v0.5.0

func NewBoldBlock(inner ...*pb.Block) *pb.Block

func NewContainerBlock added in v0.5.0

func NewContainerBlock(inner ...*pb.Block) *pb.Block

func NewFencedCodeBlock added in v0.5.0

func NewFencedCodeBlock(info string, text string) *pb.Block

func NewHeadingBlock added in v0.5.0

func NewHeadingBlock(level int, inner ...*pb.Block) *pb.Block

func NewInlineCodeBlock added in v0.5.0

func NewInlineCodeBlock(text string) *pb.Block

func NewItalicsBlock added in v0.5.0

func NewItalicsBlock(inner ...*pb.Block) *pb.Block

func NewLinkBlock added in v0.5.0

func NewLinkBlock(url string, inner ...*pb.Block) *pb.Block

func NewListBlock added in v0.5.0

func NewListBlock(inner ...*pb.Block) *pb.Block

func NewSpoilerBlock added in v0.5.0

func NewSpoilerBlock(inner ...*pb.Block) *pb.Block

func NewStrikethroughBlock added in v0.5.0

func NewStrikethroughBlock(inner ...*pb.Block) *pb.Block

func NewTextBlock added in v0.5.0

func NewTextBlock(text string) *pb.Block

func NewTextBlockf added in v0.5.0

func NewTextBlockf(format string, args ...any) *pb.Block

func NewTimestampBlock added in v0.5.0

func NewTimestampBlock(target time.Time) *pb.Block

func NewUnderlineBlock added in v0.5.0

func NewUnderlineBlock(inner ...*pb.Block) *pb.Block

Types

type ChatIngestClient

type ChatIngestClient struct {
	Inner pb.ChatIngestClient
	// contains filtered or unexported fields
}

func NewChatIngestClient

func NewChatIngestClient(seabirdCoreUrl, seabirdCoreToken string) (*ChatIngestClient, error)

func (*ChatIngestClient) Close

func (c *ChatIngestClient) Close() error

func (*ChatIngestClient) IngestEvents

func (c *ChatIngestClient) IngestEvents(backendType, backendID string) (*SeabirdChatIngestStream, error)

type Client added in v0.3.0

type Client struct {
	Inner pb.SeabirdClient
	// contains filtered or unexported fields
}

Client is a convenience wrapper around an inner gRPC SeabirdClient.

It handles authentication, HTTP/HTTPS connection boilerplate, and provides a wrapper around the StreamEvents method to make it easier to work with.

func NewClient added in v0.3.0

func NewClient(seabirdCoreUrl, seabirdCoreToken string) (*Client, error)

func (*Client) Close added in v0.3.0

func (c *Client) Close() error

func (*Client) MentionReply added in v0.3.0

func (c *Client) MentionReply(source *pb.ChannelSource, msg string) error

func (*Client) MentionReplyf added in v0.3.0

func (c *Client) MentionReplyf(source *pb.ChannelSource, format string, args ...interface{}) error

func (*Client) Reply added in v0.3.0

func (c *Client) Reply(source *pb.ChannelSource, msg string) error

func (*Client) ReplyBlocks added in v0.5.0

func (c *Client) ReplyBlocks(source *pb.ChannelSource, blocks ...*pb.Block) error

func (*Client) Replyf added in v0.3.0

func (c *Client) Replyf(source *pb.ChannelSource, format string, args ...interface{}) error

func (*Client) StreamEvents added in v0.3.0

func (c *Client) StreamEvents(cmds map[string]*pb.CommandMetadata) (*EventStream, error)

type EventStream added in v0.3.0

type EventStream struct {
	C <-chan *pb.Event
	// contains filtered or unexported fields
}

func (*EventStream) Close added in v0.3.0

func (s *EventStream) Close() error

type SeabirdChatIngestStream

type SeabirdChatIngestStream struct {
	C <-chan *pb.ChatRequest
	// contains filtered or unexported fields
}

func (*SeabirdChatIngestStream) Close

func (s *SeabirdChatIngestStream) Close() error

func (*SeabirdChatIngestStream) Send

func (s *SeabirdChatIngestStream) Send(event *pb.ChatEvent) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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