transport

package
v0.0.0-...-6b47566 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetTransports

func GetTransports(ctx context.Context) []string

func InitializeTransports

func InitializeTransports()

func RegisterTransport

func RegisterTransport(transport ITransport)

func StartTransports

func StartTransports()

func UpdateTransportStatus

func UpdateTransportStatus(ctx context.Context, t ITransport, m msg.Message, status string)

Types

type ITransport

type ITransport interface {
	GetName() string
	Start()
	SendMessage(ctx context.Context, config TransportConfig, message msg.Message) (err error)
	NewTransportConfig(ctx context.Context)
}

func GetTransport

func GetTransport(ctx context.Context, name string) (ITransport, error)

type TransportConfig

type TransportConfig struct {
	gorm.Model `json:"-"`
	UserID     uint `json:"-"`
	Transport  string
	Config     string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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