logics

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2025 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccountLogic

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

AccountLogic 账号处理逻辑

func NewAccountLogic

func NewAccountLogic() *AccountLogic

NewAccountLogic 账号逻辑实例化

func (*AccountLogic) GetSiteURL

func (t *AccountLogic) GetSiteURL(code string) string

GetSiteURL 获取短链接的完整URL

func (*AccountLogic) Login

func (t *AccountLogic) Login(username string, password string) (string, error)

Check 检查账号密码

func (*AccountLogic) Remove

func (t *AccountLogic) Remove(token string) error

Remove 移除账号

type HistoryLogic

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

HistoryLogic 历史记录逻辑层

func NewHistoryLogic

func NewHistoryLogic() *HistoryLogic

NewHistoryLogic 创建历史记录逻辑层

func (*HistoryLogic) GetSiteURL

func (t *HistoryLogic) GetSiteURL(code string) string

GetSiteURL 获取短链接的完整URL

func (*HistoryLogic) HistoryAdd

func (t *HistoryLogic) HistoryAdd(params types.HistoryParams) error

HistoryAdd 添加历史记录

func (*HistoryLogic) HistoryAll

func (t *HistoryLogic) HistoryAll(reqQuery types.ReqQueryHistory) (int, []types.ResHistory, types.ResPage)

HistoryAll 获取所有短链接

func (*HistoryLogic) HistoryDeleteAll

func (t *HistoryLogic) HistoryDeleteAll(ids []string) int

HistoryDeleteAll 删除所有历史记录

type ShortenLogic

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

ShortenLogic 短链接逻辑层

func NewShortenLogic

func NewShortenLogic() *ShortenLogic

NewShortenLogic 创建短链接逻辑层

func (*ShortenLogic) GetSiteURL

func (t *ShortenLogic) GetSiteURL(code string) string

GetSiteURL 获取短链接的完整URL

func (*ShortenLogic) ShortenAdd

func (t *ShortenLogic) ShortenAdd(code string, originalURL string, describe string) (int, types.ResShorten)

ShortenAdd 添加短链接

func (*ShortenLogic) ShortenAll

func (t *ShortenLogic) ShortenAll(reqQuery types.ReqQueryShorten) (int, []types.ResShorten, types.ResPage)

ShortenAll 获取所有短链接

func (*ShortenLogic) ShortenDelete

func (t *ShortenLogic) ShortenDelete(code string) int

ShortenDelete 删除短链接

func (*ShortenLogic) ShortenDeleteAll

func (t *ShortenLogic) ShortenDeleteAll(ids []string) int

ShortenDeleteAll 删除所有短链接

func (*ShortenLogic) ShortenFind

func (t *ShortenLogic) ShortenFind(code string) (int, types.ResShorten)

ShortenFind 获取短链接

func (*ShortenLogic) ShortenUpdate

func (t *ShortenLogic) ShortenUpdate(code string, originalURL string, describe string) (int, types.ResShorten)

ShortenUpdate 更新短链接

Jump to

Keyboard shortcuts

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