service

package
v1.8.8 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2019 License: GPL-3.0 Imports: 22 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 added in v1.4.0

func Database() string

Database returns the underlying database name.

func DisconnectDB

func DisconnectDB()

DisconnectDB disconnects from the database.

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.

type UserBlog

type UserBlog struct {
	ID               uint64 `json:"id,omitempty"` // blog ID
	Title            string `json:"title"`        // blog title
	URL              string `json:"url"`          // blog URL
	UserID           uint64 `json:"userId,omitempty"`
	UserRole         int    `json:"userRole,omitempty"`
	UserArticleCount int    `json:"userArticleCount"`
}

UserBlog represents user blog.

Jump to

Keyboard shortcuts

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