webhooks

package
v0.0.0-...-f573d82 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2024 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	WelcomeResponse = response{

		Code:    codeWelcome,
		Details: "Welcome to discord-bot for ZeroOnyx, for usage instructions see https://github.com/ZeroHubProjects/discord-bot/blob/master/README.md",
		// contains filtered or unexported fields
	}
	SuccessResponse = response{

		Code: codeSuccess,
		// contains filtered or unexported fields
	}
	ForbiddenResponse = response{

		Code:    codeBadAccessKey,
		Details: "An access `key` is required, but is invalid or missing",
		// contains filtered or unexported fields
	}
	InternalErrorResponse = response{

		Code:    codeInternalServerError,
		Details: "An internal server error has occured. Please contact the maintainers or submit an issue at https://github.com/ZeroHubProjects/discord-bot/issues",
		// contains filtered or unexported fields
	}
)

Functions

This section is empty.

Types

type AhelpMessage

type AhelpMessage struct {
	SenderKey string `json:"sender_key"`
	TargetKey string `json:"target_key"`
	Message   string `json:"message"`
}

type EmoteMessage

type EmoteMessage struct {
	SenderKey string `json:"sender_key"`
	Name      string `json:"name"`
	Message   string `json:"message"`
}

type OOCMessage

type OOCMessage struct {
	SenderKey string `json:"sender_key"`
	Message   string `json:"message"`
}

type WebhookServer

type WebhookServer struct {
	Port                 int
	SS13AccessKey        string
	OOCMessagesEnabled   bool
	OOCMessageQueue      chan OOCMessage
	EmoteMessagesEnabled bool
	EmoteMessageQueue    chan EmoteMessage
	AhelpMessagesEnabled bool
	AhelpMessageQueue    chan AhelpMessage
	Logger               *zap.SugaredLogger
}

func (*WebhookServer) Run

func (s *WebhookServer) Run(wg *sync.WaitGroup)

Jump to

Keyboard shortcuts

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