log

package
v0.0.0-...-fe53abc Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConsoleError

func ConsoleError(err error)

ConsoleError memberikan output error kedalam console

func ConsoleFatal

func ConsoleFatal(err error)

ConsoleFatal memberikan output fatal kedalam console dan menghentikan program

func ConsoleInfo

func ConsoleInfo(msg ...string)

ConsoleInfo memberikan output info kedalam console

func FileError

func FileError(err error)

FileError memberikan output error kedalam file log

func NewDiscordWebhook

func NewDiscordWebhook(url string) *discordWebhook

NewDiscordWebhook membuat objek discord webhook baru

Types

type EmbedWebhookMessage

type EmbedWebhookMessage struct {
	Title string `json:"title,omitempty"`
	Type  string `json:"type,omitempty"`
	Desc  string `json:"description,omitempty"`
	Color string `json:"color,omitempty"`
}

type IncomingWebhookMessage

type IncomingWebhookMessage struct {
	Content   string                `json:"content,omitempty"`
	Username  string                `json:"username,omitempty"`
	AvatarUrl string                `json:"avatar_url,omitempty"`
	TTS       bool                  `json:"tts,omitempty"`
	Embeds    []EmbedWebhookMessage `json:"embeds,omitempty"`
}

IncomingWebhookMessage merupakan body request untuk incoming webhook discord, detail https://birdie0.github.io/discord-webhooks-guide/discord_webhook.html

Jump to

Keyboard shortcuts

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