peqeditorsql

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2022 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	//ActionMessage is used when broadcasting to discord a message
	ActionMessage = "message"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type PEQEditorSQL

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

PEQEditorSQL represents a peqeditorsql connection

func New

func New(ctx context.Context, config config.PEQEditorSQL) (*PEQEditorSQL, error)

New creates a new peqeditorsql connect

func (*PEQEditorSQL) Connect

func (t *PEQEditorSQL) Connect(ctx context.Context) error

Connect establishes a new connection with PEQEditorSQL

func (*PEQEditorSQL) Disconnect

func (t *PEQEditorSQL) Disconnect(ctx context.Context) error

Disconnect stops a previously started connection with PEQEditorSQL. If called while a connection is not active, returns nil

func (*PEQEditorSQL) IsConnected

func (t *PEQEditorSQL) IsConnected() bool

IsConnected returns if a connection is established

func (*PEQEditorSQL) Send

func (t *PEQEditorSQL) Send(ctx context.Context, source string, author string, channelID int, message string, optional string) error

Send attempts to send a message through PEQEditorSQL.

func (*PEQEditorSQL) Subscribe

func (t *PEQEditorSQL) Subscribe(ctx context.Context, onMessage func(interface{}) error) error

Subscribe listens for new events on peqeditorsql

Jump to

Keyboard shortcuts

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