service

package
v0.0.0-...-0ec75ca Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2019 License: GPL-3.0 Imports: 24 Imported by: 0

Documentation

Overview

Package service is the "business logic" layer, encapsulates transaction.

Index

Constants

This section is empty.

Variables

View Source
var Archive = &archiveService{
	mutex: &sync.Mutex{},
}

Archive service.

View Source
var Article = &articleService{
	mutex: &sync.Mutex{},
}

Article service.

View Source
var Category = &categoryService{
	mutex: &sync.Mutex{},
}

Category service.

View Source
var Comment = &commentService{
	mutex: &sync.Mutex{},
}

Comment service.

View Source
var Export = &exportService{}

Export service.

View Source
var Import = &importService{}

Import service.

View Source
var Init = &initService{
	mutex: &sync.Mutex{},
}

Init service.

View Source
var Navigation = &navigationService{
	mutex: &sync.Mutex{},
}

Navigation service.

View Source
var Setting = &settingService{
	mutex: &sync.Mutex{},
}

Setting service.

View Source
var Statistic = &statisticService{
	mutex: &sync.Mutex{},
}

Statistic service.

View Source
var Tag = &tagService{
	mutex: &sync.Mutex{},
}

Tag service.

View Source
var Upgrade = &upgradeService{
	mutex: &sync.Mutex{},
}

Upgrade service.

View Source
var User = &userService{
	mutex: &sync.Mutex{},
}

User service.

Functions

func ConnectDB

func ConnectDB()

ConnectDB connects to the database.

func Database

func Database() string

Database returns the underlying database name.

func DisconnectDB

func DisconnectDB()

DisconnectDB disconnects from the database.

func GetPage

func GetPage(c *gin.Context) int

GetPage returns paging parameter.

Types

type MarkdownFile

type MarkdownFile struct {
	Name    string
	Path    string
	Content string
}

MarkdownFile represents markdown file.

type PlatformStatus

type PlatformStatus struct {
	Version string `json:"version"`
	Locale  string `json:"locale"`
	Inited  bool   `json:"inited"`
}

PlatformStatus represents platform status.

Jump to

Keyboard shortcuts

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