mirror of https://github.com/go-sonic/sonic.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
1.6 KiB
Go
40 lines
1.6 KiB
Go
package service
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/go-sonic/sonic/consts"
|
|
"github.com/go-sonic/sonic/model/dto"
|
|
"github.com/go-sonic/sonic/model/param"
|
|
"github.com/go-sonic/sonic/model/property"
|
|
)
|
|
|
|
type OptionService interface {
|
|
GetOrByDefaultWithErr(ctx context.Context, p property.Property, defaultValue interface{}) (interface{}, error)
|
|
GetOrByDefault(ctx context.Context, p property.Property) interface{}
|
|
GetBlogBaseURL(ctx context.Context) (string, error)
|
|
IsEnabledAbsolutePath(ctx context.Context) (bool, error)
|
|
GetPathSuffix(ctx context.Context) (string, error)
|
|
GetArchivePrefix(ctx context.Context) (string, error)
|
|
Save(ctx context.Context, optionMap map[string]string) error
|
|
ListAllOption(ctx context.Context) ([]*dto.Option, error)
|
|
GetLinksPrefix(ctx context.Context) (string, error)
|
|
GetPhotoPrefix(ctx context.Context) (string, error)
|
|
GetJournalPrefix(ctx context.Context) (string, error)
|
|
GetActivatedThemeId(ctx context.Context) (string, error)
|
|
GetPostPermalinkType(ctx context.Context) (consts.PostPermalinkType, error)
|
|
GetSheetPermalinkType(ctx context.Context) (consts.SheetPermaLinkType, error)
|
|
GetIndexPageSize(ctx context.Context) int
|
|
GetPostSort(ctx context.Context) param.Sort
|
|
GetPostSummaryLength(ctx context.Context) int
|
|
GetCategoryPrefix(ctx context.Context) (string, error)
|
|
GetTagPrefix(ctx context.Context) (string, error)
|
|
GetLinkPrefix(ctx context.Context) (string, error)
|
|
GetSheetPrefix(ctx context.Context) (string, error)
|
|
GetAttachmentType(ctx context.Context) consts.AttachmentType
|
|
}
|
|
|
|
type ClientOptionService interface {
|
|
OptionService
|
|
}
|