models

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2021 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MapStructsToTables

func MapStructsToTables(dbmap *gorp.DbMap)

MapStructsToTables 構造体と物理テーブルの紐付け

Types

type AnswerSet

type AnswerSet struct {
	NwAddr1st string `json:"nwaddr_1st"`
	NwAddr2nd string `json:"nwaddr_2nd"`
	NwAddr3rd string `json:"nwaddr_3rd"`
	NwAddr4th string `json:"nwaddr_4th"`
	BcAddr1st string `json:"bcaddr_1st"`
	BcAddr2nd string `json:"bcaddr_2nd"`
	BcAddr3rd string `json:"bcaddr_3rd"`
	BcAddr4th string `json:"bcaddr_4th"`
	Elapsed   int    `json:"elapsed"`
}

type NowNumber

type NowNumber struct {
	Now   int `db:"now"`
	Total int `db:"total"`
}

type QuestionSet

type QuestionSet struct {
	Id         string `json:"id"`
	Number     int    `json:"q_number"`
	Source     string `json:"source"`
	CIDRbits   int    `json:"cidr_bits"`
	SubnetMask string `json:"subnet_mask"`
}

type RawData

type RawData struct {
	Id       TranID         `json:"id_data"`
	Question []TranQuestion `json:"question_data"`
}

type ResultCollection

type ResultCollection struct {
	Id     string      `json:"id"`
	Result []ResultSet `json:"result"`
}

type ResultSet

type ResultSet struct {
	Number     int    `json:"q_number"`
	Source     string `json:"source"`
	CIDRbits   int    `json:"cidr_bits"`
	SubnetMask string `json:"subnet_mask"`
	AnsNwAddr  string `json:"answer_nw"`
	AnsBcAddr  string `json:"answer_bc"`
}

type ResumeSet

type ResumeSet struct {
	Id         string `json:"id"`
	Number     int    `json:"q_number"`
	Source     string `json:"source"`
	CIDRbits   int    `json:"cidr_bits"`
	SubnetMask string `json:"subnet_mask"`
	Elapsed    int    `json:"elapsed"`
}

type SummaryCollection

type SummaryCollection struct {
	Id      string       `json:"id"`
	IsEnd   bool         `json:"is_end"`
	Summary []SummarySet `json:"summary"`
}

type SummarySet

type SummarySet struct {
	Number      int    `json:"q_number"`
	Source      string `json:"source"`
	CIDRbits    int    `json:"cidr_bits"`
	SubnetMask  string `json:"subnet_mask"`
	CorNwAddr   string `json:"correct_nw"`
	AnsNwAddr   string `json:"answer_nw"`
	CorBcAddr   string `json:"correct_bc"`
	AnsBcAddr   string `json:"answer_bc"`
	AnswerdTime int    `json:"answered_sec"`
}

type TranID

type TranID struct {
	Id     string `db:"id, primarykey" json:"id"`
	Total  int    `db:"total" json:"total"`
	IsEnd  int    `db:"is_end" json:"is_end"`
	Expire string `db:"expire" json:"expire"`
}

type TranQuestion

type TranQuestion struct {
	Id        string `db:"id, primarykey" json:"id"`
	Number    int    `db:"question_number, primarykey" json:"q_number"`
	Source    string `db:"source" json:"source"`
	CIDRbits  int    `db:"cidr_bits" json:"cidr_bits"`
	IsCIDR    int    `db:"is_cidr" json:"is_cidr"`
	CorNwAddr string `db:"correct_nw" json:"correct_nw"`
	AnsNwAddr string `db:"answer_nw" json:"answer_nw"`
	CorBcAddr string `db:"correct_bc" json:"correct_bc"`
	AnsBcAddr string `db:"answer_bc" json:"answer_bc"`
	Elapsed   int    `db:"elapsed" json:"elapsed"`
	Created   string `db:"created" json:"created"`
	Updated   string `db:"updated" json:"updated"`
}

Jump to

Keyboard shortcuts

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