httpmodels

package
v2.4.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2017 License: MIT Imports: 6 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CategoryNameValidator

func CategoryNameValidator(v interface{}, param string) error

CategoryNameValidator Method to validate category name. Not all names allowed. Allowed only: [a-zA-Z0-9_]

Types

type RequestLogAdd

type RequestLogAdd struct {
	ID        bson.ObjectId `bson:"_id,omitempty"`
	Category  string        `validate:"nonzero,CategoryNameValidators"`
	Level     string        `validate:"nonzero"`
	Message   string        `validate:"nonzero"`
	Timestamp int64         `validate:"nonzero"`
	ExpiresAt int64         `validate:"nonzero"`
}

RequestLogAdd Request Struct for LogAdd

func (*RequestLogAdd) Validate

func (c *RequestLogAdd) Validate() error

Validate Struct for LogAdd

type RequestLogAddCustom

type RequestLogAddCustom struct {
	ID             bson.ObjectId `bson:"_id,omitempty"`
	Category       string        `validate:"nonzero,CategoryNameValidators"`
	Level          string        `validate:"nonzero"`
	Message        string        `validate:"nonzero"`
	Timestamp      int64         `validate:"nonzero"`
	ExpiresAt      int64         `validate:"nonzero"`
	Tags           []string
	AdditionalData interface{}
}

RequestLogAddCustom Request Struct for LogAddCustom

func (RequestLogAddCustom) Validate

func (c RequestLogAddCustom) Validate() error

Validate Struct for LogAddCustom

type RequestLogGetCount

type RequestLogGetCount struct {
	Category     string `validate:"nonzero,CategoryNameValidators"`
	SearchFilter map[string]interface{}
}

RequestLogGetCount Request Struct for LogGetCount

func (RequestLogGetCount) Validate

func (c RequestLogGetCount) Validate() error

Validate Struct for LogGetCount

type RequestLogGetLog

type RequestLogGetLog struct {
	Category     string `validate:"nonzero,CategoryNameValidators"`
	SearchFilter map[string]interface{}
	Limit        int `validate:"max=1000, min=1"`
	Offset       int
	Sort         []string
}

RequestLogGetLog Request Struct for LogGetLog

func (RequestLogGetLog) Validate

func (c RequestLogGetLog) Validate() error

Validate Struct for LogGetLog

type RequestLogModifyTTL

type RequestLogModifyTTL struct {
	Category     string                 `validate:"nonzero,CategoryNameValidators"`
	SearchFilter map[string]interface{} `validate:"nonzero"`
	NewTTL       int64                  `validate:"nonzero"`
}

RequestLogModifyTTL Request Struct for LogModifyTTL

func (RequestLogModifyTTL) Validate

func (c RequestLogModifyTTL) Validate() error

Validate Struct for LogModifyTTL

type RequestLogRemoveCategory

type RequestLogRemoveCategory struct {
	Category string `validate:"nonzero,CategoryNameValidators"`
}

RequestLogRemoveCategory Request Struct for LogGetRemoveCategory

func (RequestLogRemoveCategory) Validate

func (c RequestLogRemoveCategory) Validate() error

Validate Struct for LogGetRemoveCategory

type RequestLogRemoveLog

type RequestLogRemoveLog struct {
	Category     string `validate:"nonzero,CategoryNameValidators"`
	SearchFilter map[string]interface{}
}

RequestLogRemoveLog Request Struct for LogGetRemoveLog

func (RequestLogRemoveLog) Validate

func (c RequestLogRemoveLog) Validate() error

Validate Struct for LogGetRemoveLog

type RequestLogTransferLog

type RequestLogTransferLog struct {
	OldCategory  string `validate:"nonzero,CategoryNameValidators"`
	NewCategory  string `validate:"nonzero,CategoryNameValidators"`
	SearchFilter map[string]interface{}
}

RequestLogTransferLog Request Struct for LogTransferLog

func (RequestLogTransferLog) Validate

func (c RequestLogTransferLog) Validate() error

Validate Struct for LogTransferLog

type ResponseLogAdd

type ResponseLogAdd struct {
	LogID string `json:"logId"`
}

ResponseLogAdd Request Struct for LogAdd

type ResponseLogGet

type ResponseLogGet struct {
	LogList []mongomodels.MongoCustomLog `json:"logList"`
}

ResponseLogGet Request Struct for LogGet

type ResponseLogGetCategories

type ResponseLogGetCategories struct {
	CategoriesList []string `json:"categoriesList"`
}

ResponseLogGetCategories Request Struct for LogGetCategories

type ResponseLogGetCount

type ResponseLogGetCount struct {
	LogCount int `json:"logCount"`
}

ResponseLogGetCount Request Struct for LogGetCount

type ResponseLogModifyTTL

type ResponseLogModifyTTL struct {
	Matched    int         `json:"matched"`
	Updated    int         `json:"updated"`
	UpsertedID interface{} `json:"upsertedId"`
}

ResponseLogModifyTTL Request Struct for LogModifyTTL

type ResponseLogRemoveCategory

type ResponseLogRemoveCategory struct {
	Success int `json:"success"`
}

ResponseLogRemoveCategory Request Struct for LogRemoveCategory

type ResponseLogRemoveLog

type ResponseLogRemoveLog struct {
	Matched int `json:"matched"`
	Removed int `json:"removed"`
}

ResponseLogRemoveLog Request Struct for LogRemoveLog

type ResponseLogTransferLog

type ResponseLogTransferLog struct {
	TransferedLogID []bson.ObjectId `json:"transferedLogId"`
}

ResponseLogTransferLog Request Struct for LogTransferLog

Jump to

Keyboard shortcuts

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