config

package
v0.0.0-...-671c73a Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2023 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 CacheExpire

type CacheExpire struct {
	NullKey       string `mapstructure:"null-key" json:"null-key" yaml:"null-key"`                   // 空值缓存过期时间
	UserBaseInfo  string `mapstructure:"user-base-info" json:"user-base-info" yaml:"user-base-info"` // 用户基本信息过期时间
	VideoBaseInfo string `mapstructure:"video-info" json:"video-info" yaml:"video-info"`             // 视频基本信息过期时间
}

func (*CacheExpire) ParseNullKeyExpireDuration

func (c *CacheExpire) ParseNullKeyExpireDuration() time.Duration

func (*CacheExpire) ParseUserBaseInfoExpireDuration

func (c *CacheExpire) ParseUserBaseInfoExpireDuration() time.Duration

func (*CacheExpire) ParseVideoBaseInfoExpireDuration

func (c *CacheExpire) ParseVideoBaseInfoExpireDuration() time.Duration

type ETCD

type ETCD struct {
	Host string `mapstructure:"host" json:"host"`
	Port string `mapstructure:"port" json:"port"`
}

func (*ETCD) Addr

func (e *ETCD) Addr() string

type FileAccess

type FileAccess struct {
	UploadPath string `mapstructure:"upload_path" json:"upload_path" yaml:"upload_path"` // 文件存储地址
	NginxUrl   string `mapstructure:"nginx_url" json:"nginx_url" yaml:"nginx_url"`       // nginx访问地址
}

type Hertz

type Hertz struct {
	Host string `mapstructure:"host" json:"host"`
	Port string `mapstructure:"port" json:"port"`
}

func (*Hertz) Addr

func (h *Hertz) Addr() string

type JWT

type JWT struct {
	SigningKey  string `mapstructure:"signing-key" json:"signing-key" yaml:"signing-key"`    // jwt签名
	ExpiresTime string `mapstructure:"expires-time" json:"expires-time" yaml:"expires-time"` // 过期时间
	Issuer      string `mapstructure:"issuer" json:"issuer" yaml:"issuer"`                   // 签发者
	Subject     string `mapstructure:"subject" json:"subject" yaml:"subject"`                // 主题
}

type MongoDB

type MongoDB struct {
	Host     string `mapstructure:"host" json:"host" yaml:"host"`
	Port     string `mapstructure:"port" json:"port" yaml:"port"`
	Username string `mapstructure:"username" json:"username" yaml:"username"`
	Password string `mapstructure:"password" json:"password" yaml:"password"`
	Database string `mapstructure:"database" json:"database" yaml:"database"`
}

func (*MongoDB) Url

func (m *MongoDB) Url() string

type MySQL

type MySQL struct {
	Host     string `mapstructure:"host" json:"host" yaml:"host"`             // 服务器地址
	Port     string `mapstructure:"port" json:"port" yaml:"port"`             // 端口
	Config   string `mapstructure:"config" json:"config" yaml:"config"`       // 高级配置
	DBName   string `mapstructure:"db-name" json:"db-name" yaml:"db-name"`    // 数据库名
	Username string `mapstructure:"username" json:"username" yaml:"username"` // 数据库用户名
	Password string `mapstructure:"password" json:"password" yaml:"password"` // 数据库密码
}

func (*MySQL) DSN

func (m *MySQL) DSN() string

type Play

type Play struct {
	VideoURL string `mapstructure:"video_url" json:"video_url" yaml:"video_url"`
	CoverURL string `mapstructure:"cover_url" json:"cover_url" yaml:"cover_url"`
}

type RPCClient

type RPCClient struct {
	UserServiceName     string `mapstructure:"user_service_name" yaml:"user_service_name"`
	PublishServiceName  string `mapstructure:"publish_service_name" yaml:"publish_service_name"`
	FeedServiceName     string `mapstructure:"feed_service_name" yaml:"feed_service_name"`
	FavoriteServiceName string `mapstructure:"favorite_service_name" yaml:"favorite_service_name"`
	CommentServiceName  string `mapstructure:"comment_service_name" yaml:"comment_service_name"`
	RelationServiceName string `mapstructure:"relation_service_name" yaml:"relation_service_name"`
	MessageServiceName  string `mapstructure:"message_service_name" yaml:"message_service_name"`
}

type RPCServer

type RPCServer struct {
	ServiceName string `mapstructure:"service-name" json:"service-name"`
	Host        string `mapstructure:"host" json:"host"`
	Port        string `mapstructure:"port" json:"port"`
}

func (*RPCServer) Addr

func (r *RPCServer) Addr() string

type Redis

type Redis struct {
	Host     string `mapstructure:"host" json:"host" yaml:"host"` // 服务器地址
	Port     string `mapstructure:"port" json:"port" yaml:"port"` // 端口
	DB       int    `mapstructure:"db" json:"db" yaml:"db"`
	Password string `mapstructure:"password" json:"password" yaml:"password"`
}

func (*Redis) Addr

func (r *Redis) Addr() string

type StaticResource

type StaticResource struct {
	DefaultAvatar          string `mapstructure:"default-avatar" json:"default-avatar"`
	DefaultBackgroundImage string `mapstructure:"default-background-image" json:"default-background-image"`
}

type Upload

type Upload struct {
	VideoPath string `mapstructure:"video_path" json:"video_path"`
	CoverPath string `mapstructure:"cover_path" json:"cover_path"`
}

Jump to

Keyboard shortcuts

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