models

package
v0.0.46 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2024 License: GPL-3.0 Imports: 7 Imported by: 1

Documentation

Index

Constants

View Source
const (
	UrlParameter_ForumId    = "f"
	UrlParameter_ThreadId   = "t"
	UrlParameter_PageNumber = "p"
)
View Source
const (
	ErrRequestIsNotSet              = "request is not set"
	ErrUnsupportedParameter         = "unsupported parameter: %v"
	ErrDuplicateParameter           = "duplicate parameter: %v"
	ErrMultipleObjectTypesRequested = "multiple object types were requested"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BlockIPAddressParams

type BlockIPAddressParams struct {
	cmr.CommonParams

	// IP address of a client to block.
	UserIPA string `json:"userIPA"`

	// Block time in seconds.
	// This is a period for which the specified IP address will be blocked. If
	// for some reason a record with the specified IP address already exists,
	// this time will be added to an already existing value.
	BlockTimeSec uint `json:"blockTimeSec"`
}

type BlockIPAddressResult

type BlockIPAddressResult struct {
	cmr.CommonResult

	OK bool `json:"ok"`
}

type FrontEndData added in v0.0.8

type FrontEndData struct {
	AdminHtmlPage FrontEndFileData
	AdminJs       FrontEndFileData
	ArgonJs       FrontEndFileData
	ArgonWasm     FrontEndFileData
	BppJs         FrontEndFileData
	CssStyles     FrontEndFileData
	FavIcon       FrontEndFileData
	IndexHtmlPage FrontEndFileData
	LoaderScript  FrontEndFileData
}

FrontEndData is auxiliary data for front end.

type FrontEndFileData added in v0.0.8

type FrontEndFileData struct {
	UrlPath     string
	FilePath    string
	ContentType string
	CachedFile  []byte
}

FrontEndFileData is auxiliary data for a front end static file.

func NewFrontEndFileData added in v0.0.8

func NewFrontEndFileData(frontEndPath string, fileName string, contentType string, frontendAssetsFolder string) (fefd FrontEndFileData, err error)

type IsIPAddressBlockedParams

type IsIPAddressBlockedParams struct {
	cmr.CommonParams

	// IP address of a client to check.
	UserIPA string `json:"userIPA"`
}

type IsIPAddressBlockedResult

type IsIPAddressBlockedResult struct {
	cmr.CommonResult

	IsBlocked bool `json:"isBlocked"`
}

type PingParams

type PingParams = cmr.PingParams

type PingResult

type PingResult = cmr.PingResult

type RequestId

type RequestId = uint

type Settings added in v0.0.13

type Settings struct {
	Version                   uint   `json:"version"`
	ProductVersion            string `json:"productVersion"`
	SiteName                  string `json:"siteName"`
	SiteDomain                string `json:"siteDomain"`
	CaptchaFolder             string `json:"captchaFolder"`
	SessionMaxDuration        uint   `json:"sessionMaxDuration"`
	MessageEditTime           uint   `json:"messageEditTime"`
	PageSize                  uint   `json:"pageSize"`
	ApiFolder                 string `json:"apiFolder"`
	PublicSettingsFileName    string `json:"publicSettingsFileName"`
	IsFrontEndEnabled         bool   `json:"isFrontEndEnabled"`
	FrontEndStaticFilesFolder string `json:"frontEndStaticFilesFolder"`
}

type ShowDiagnosticDataParams

type ShowDiagnosticDataParams struct{}

type ShowDiagnosticDataResult

type ShowDiagnosticDataResult struct {
	cmr.CommonResult
	cmr.RequestsCount
}

type UrlParameter

type UrlParameter struct {
	ForumId    *uint
	ThreadId   *uint
	PageNumber *uint
}

UrlParameter is a set of URL query parameters.

func NewUrlParameterFromHttpRequest

func NewUrlParameterFromHttpRequest(req *http.Request) (up *UrlParameter, err error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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