internal

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2023 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCfgPath

func GetCfgPath() string

GetCfgPath ...

func NewDB

func NewDB(dbFilePath string) *gorm.DB

NewDB ...

func NewLogger

func NewLogger(logFile string) *logrus.Logger

NewLogger ...

Types

type File

type File struct {
	ID       int    `json:"id" gorm:"column:id;AUTO_INCREMENT;not null"`
	Name     string `json:"file_name" gorm:"column:file_name;not null"`
	Md5      string `json:"file_md5" gorm:"column:file_md5;not null"`
	Size     string `json:"file_size" gorm:"column:file_size;not null"`
	Path     string `json:"file_path" gorm:"column:file_path;not null"`
	CreateAt string `json:"create_at" gorm:"column:create_at;not null"`
}

File ...

func (*File) TableName

func (f *File) TableName() string

TableName ...

type Git

type Git struct {
	Repo        string `json:"repo" yaml:"repo"`
	Owner       string `json:"owner" yaml:"owner"`
	Email       string `json:"email" yaml:"email"`
	AccessToken string `json:"access_token" yaml:"accessToken"`
}

Git git 配置

func (*Git) Delete

func (t *Git) Delete(path string) error

Delete 删除文件

func (*Git) Get

func (t *Git) Get(path string) (string, error)

Get 获取文件

func (*Git) GetContent

func (t *Git) GetContent(path string) string

GetContent ...

func (*Git) GetFileUrl

func (t *Git) GetFileUrl(path string) string

GetFileUrl 获取文件链接

func (*Git) GetLastVersion

func (t *Git) GetLastVersion() string

GetLastVersion 获取应用最后版本号

func (*Git) Update

func (t *Git) Update(path string, content string) error

Update 新增或更新文件

type Response

type Response struct {
	Code int         `json:"code"`
	Msg  string      `json:"msg"`
	Data interface{} `json:"data"`
}

Resp ...

func Fail

func Fail(message string) *Response

Fail ...

func Success

func Success(data interface{}) *Response

Success ...

Jump to

Keyboard shortcuts

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