model

package
v0.0.0-...-83adff0 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2020 License: GPL-3.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var PubStates = &States{
	LegalStates: map[int]bool{
		-40:   true,
		0:     true,
		10000: true,
		1:     true,
		1001:  true,
		15000: true,
		20000: true,
		30000: true,
	},
}

PubStates publish states

Functions

This section is empty.

Types

type ArchiveMessage

type ArchiveMessage struct {
	Action string       `json:"action"`
	Table  string       `json:"table"`
	New    *ArchiveMeta `json:"new"`
	Old    *ArchiveMeta `json:"old"`
}

ArchiveMessage databus message

type ArchiveMeta

type ArchiveMeta struct {
	AID   uint64 `json:"aid"`
	Title string `json:"title"`
	State int    `json:"state"`
}

ArchiveMeta Archive Metadata

type Document

type Document struct {
	ID      uint64 `json:"id"`
	Content string `json:"content"`
}

Document id and content

type DocumentsResp

type DocumentsResp struct {
	Documents []Document `json:"ducuments"`
	Tokens    []string   `json:"tokens"`
	Page      *Page      `json:"page"`
}

DocumentsResp resp of documents

type IDsResp

type IDsResp struct {
	IDs    []uint64 `json:"ids"`
	Tokens []string `json:"tokens"`
	Page   *Page    `json:"page"`
}

IDsResp resp of ids

type Page

type Page struct {
	PageNum  int `json:"pn"`
	PageSize int `json:"ps"`
	Total    int `json:"total"`
}

Page Pager

type RiotSearchReq

type RiotSearchReq struct {
	IDs     []uint64 `form:"ids,split"`
	Keyword string   `form:"keyword" validate:"required"`
	Pn      int      `form:"pn" validate:"min=1"`
	Ps      int      `form:"ps" validate:"min=0"`
}

RiotSearchReq search request params

type States

type States struct {
	LegalStates map[int]bool
}

States archive states

func (*States) Legal

func (l *States) Legal(state int) bool

Legal return leagal

Jump to

Keyboard shortcuts

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