banner

package
v0.25.3 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Banner struct {
	ModuleName  string `mapstructure:"module-name" yaml:"module-name" json:"moduleName"`  // 模块名称
	Enabled     bool   `mapstructure:"enabled" yaml:"enabled" json:"enabled"`             // 是否启用Banner
	Template    string `mapstructure:"template" yaml:"template" json:"template"`          // 自定义模板
	Title       string `mapstructure:"title" yaml:"title" json:"title"`                   // 标题
	Description string `mapstructure:"description" yaml:"description" json:"description"` // 描述
	Author      string `mapstructure:"author" yaml:"author" json:"author"`                // 作者
	Email       string `mapstructure:"email" yaml:"email" json:"email"`                   // 邮箱
	Website     string `mapstructure:"website" yaml:"website" json:"website"`             // 网站
}

Banner Banner配置

func Default

func Default() *Banner

Default 创建默认Banner配置

func (*Banner) Clone

func (b *Banner) Clone() internal.Configurable

Clone 返回配置的副本

func (*Banner) Disable

func (b *Banner) Disable() *Banner

Disable 禁用Banner

func (*Banner) Enable

func (b *Banner) Enable() *Banner

Enable 启用Banner

func (*Banner) Get

func (b *Banner) Get() interface{}

Get 返回配置接口

func (*Banner) IsEnabled

func (b *Banner) IsEnabled() bool

IsEnabled 检查是否启用

func (*Banner) Set

func (b *Banner) Set(data interface{})

Set 设置配置数据

func (*Banner) Validate

func (b *Banner) Validate() error

Validate 验证配置

func (*Banner) WithAuthor

func (b *Banner) WithAuthor(author string) *Banner

WithAuthor 设置作者

func (*Banner) WithDescription

func (b *Banner) WithDescription(description string) *Banner

WithDescription 设置描述

func (*Banner) WithEmail

func (b *Banner) WithEmail(email string) *Banner

WithEmail 设置邮箱

func (*Banner) WithTemplate

func (b *Banner) WithTemplate(template string) *Banner

WithTemplate 设置自定义模板

func (*Banner) WithTitle

func (b *Banner) WithTitle(title string) *Banner

WithTitle 设置标题

func (*Banner) WithWebsite

func (b *Banner) WithWebsite(website string) *Banner

WithWebsite 设置网站

Jump to

Keyboard shortcuts

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