usecase

package
v0.0.0-...-658c694 Latest Latest
Warning

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

Go to latest
Published: May 13, 2024 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SendContactMessage

func SendContactMessage(firstname, lastname, email, message string) error

Types

type AllowedMentions

type AllowedMentions struct {
	Parse []string `json:"parse"`
}

type Config

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

func NewConfig

func NewConfig() (*Config, error)

func (*Config) ListProjects

func (c *Config) ListProjects() []Project

type ContactFormData

type ContactFormData struct {
	Header      string
	Description string
	Firstname   string
	Lastname    string
	Email       string
	Message     string
	SendText    string
}

type Project

type Project struct {
	Title        string `toml:"title"`
	Description  string `toml:"description"`
	ImagePath    string `toml:"image_path"`
	ImageCaption string `toml:"image_caption"`
}

type Translator

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

func NewTranslator

func NewTranslator() *Translator

func (*Translator) RetrieveWebsiteData

func (t *Translator) RetrieveWebsiteData(lang string) *WebsiteData

func (*Translator) RetrieveWebsiteDataWithProjects

func (t *Translator) RetrieveWebsiteDataWithProjects(lang string, projects []Project) *WebsiteData

func (*Translator) Translate

func (t *Translator) Translate(msg, lang string) string

type WebhookRequest

type WebhookRequest struct {
	Content             string          `json:"content"`
	Username            string          `json:"username"`
	AvatarUrl           string          `json:"avatar_url"`
	AllowedMentionsData AllowedMentions `json:"allowed_mentions"`
}

type WebsiteData

type WebsiteData struct {
	Projects           []Project
	CompanyName        string
	CompanyDescription string
	ThemeSwitchText    string
	ThemeSwitchAuto    string
	ThemeSwitchLight   string
	ThemeSwitchBlack   string
	BlogLinkText       string
	ImprintText        string
	LegalPolicyText    string
	PrivacyPolicyText  string
	ContactFormData    ContactFormData
}

Jump to

Keyboard shortcuts

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