service

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2023 License: BSD-3-Clause Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrCodeNotFound  = errors.New("code not found")
	ErrCodeDuplicate = errors.New("code duplicate")
	ErrCodeExhausted = errors.New("code exhausted")
)

Functions

This section is empty.

Types

type LogService

type LogService struct{}

func (LogService) AddLog

func (s LogService) AddLog(val val_obj.AccessLog)

func (LogService) CleanLog

func (LogService) CleanLog(urlid int) error

func (LogService) CountLog

func (LogService) CountLog(urlid []int) (map[uint]int, error)

func (LogService) List

func (LogService) List(urlId, page, pageSize int) ([]val_obj.AccessLog, int64, error)

type StatService

type StatService struct{}

func (StatService) DayClick

func (StatService) DayClick() ([]val_obj.StatItem, error)

func (StatService) TopBrowser

func (s StatService) TopBrowser() ([]val_obj.StatItem, error)

func (StatService) TopCountry

func (StatService) TopCountry() ([]val_obj.StatItem, error)

func (StatService) TopDevice

func (s StatService) TopDevice() ([]val_obj.StatItem, error)

func (StatService) TopOS

func (s StatService) TopOS() ([]val_obj.StatItem, error)

func (StatService) TopURL

func (StatService) TopURL() ([]val_obj.StatItem, error)

type URLService

type URLService struct{}

func (URLService) Delete

func (s URLService) Delete(id uint) error

func (URLService) GetByCode

func (URLService) GetByCode(code string) (*val_obj.URLObject, error)

func (URLService) GetById

func (URLService) GetById(id uint) (*val_obj.URLObject, error)

func (URLService) List

func (URLService) List(page, pageSize int) ([]val_obj.URLObject, int64, error)

func (URLService) New

func (URLService) SearchCode

func (s URLService) SearchCode(code string) (val_obj.URLObject, error)

func (URLService) Update

func (s URLService) Update(val val_obj.URLObject) error

func (URLService) UpdateEnabled

func (s URLService) UpdateEnabled(id uint, enabled bool) error

Jump to

Keyboard shortcuts

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