model

package
v1.4.15 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2023 License: AGPL-3.0 Imports: 16 Imported by: 0

Documentation

Overview

Nging is a toolbox for webmasters Copyright (C) 2018-present Wenhui Shen <swh@admpub.com>

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.

Index

Constants

This section is empty.

Variables

View Source
var CaddyLogRegexpList = sync.Map{}

Functions

This section is empty.

Types

type AccessLog

type AccessLog struct {
	*dbschema.NgingAccessLog
}

func NewAccessLog

func NewAccessLog(ctx echo.Context) *AccessLog

func (*AccessLog) Parse

func (l *AccessLog) Parse(line string, args ...interface{}) (err error)

Parse 解析单行字符串到日志对象

func (*AccessLog) ToLite

func (m *AccessLog) ToLite() *AccessLogLite

func (*AccessLog) ToMap

func (m *AccessLog) ToMap() echo.Store

type AccessLogLite

type AccessLogLite struct {
	Date   string
	OS     string
	Brower string
	Region string
	Type   string

	Version string
	User    string
	Method  string
	Scheme  string
	Host    string
	URI     string

	Referer string

	BodyBytes  uint64
	Elapsed    float64
	StatusCode uint
	UserAgent  string
}

type Vhost

type Vhost struct {
	*dbschema.NgingVhost
}

func NewVhost

func NewVhost(ctx echo.Context) *Vhost

func (*Vhost) Add added in v1.4.7

func (f *Vhost) Add() (interface{}, error)

func (*Vhost) Delete added in v1.4.7

func (f *Vhost) Delete(mw func(db.Result) db.Result, args ...interface{}) (err error)

func (*Vhost) Edit added in v1.4.7

func (f *Vhost) Edit(mw func(db.Result) db.Result, args ...interface{}) (err error)

func (*Vhost) RemoveCachedCert

func (m *Vhost) RemoveCachedCert()

type VhostAndGroup

type VhostAndGroup struct {
	*dbschema.NgingVhost
	Group        *dbschema.NgingVhostGroup `db:"-,relation=id:group_id|gtZero"`
	ServerName   null.String               `db:"serverName" json:",omitempty" xml:",omitempty"`
	ServerEngine null.String               `db:"serverEngine" json:",omitempty" xml:",omitempty"`
}

type VhostGroup added in v1.4.7

type VhostGroup struct {
	*dbschema.NgingVhostGroup
}

func NewVhostGroup added in v1.4.7

func NewVhostGroup(ctx echo.Context) *VhostGroup

type VhostServer added in v1.4.7

type VhostServer struct {
	*dbschema.NgingVhostServer
}

func NewVhostServer added in v1.4.7

func NewVhostServer(ctx echo.Context) *VhostServer

func (*VhostServer) Add added in v1.4.7

func (f *VhostServer) Add() (interface{}, error)

func (*VhostServer) Delete added in v1.4.7

func (f *VhostServer) Delete(mw func(db.Result) db.Result, args ...interface{}) (err error)

func (*VhostServer) Edit added in v1.4.7

func (f *VhostServer) Edit(mw func(db.Result) db.Result, args ...interface{}) (err error)

func (*VhostServer) Exists added in v1.4.7

func (f *VhostServer) Exists(ident string, exclude ...uint) (bool, error)

func (*VhostServer) SetConfigFileUpdated added in v1.4.7

func (f *VhostServer) SetConfigFileUpdated(ts uint) error

Jump to

Keyboard shortcuts

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