usbci

package
v3.6.5-1+incompatible Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2018 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init(ds store.DataStore)

Types

type Audit

type Audit struct {
	Ident
	Changes   []byte    `db:"changes,omitempty"        json:"changes"`
	AuditDate time.Time `db:"audit_date,omitempty"     json:"audit_date"`
}

func (*Audit) Create

func (this *Audit) Create() (id int64, err error)

func (*Audit) Expand

func (this *Audit) Expand() (Changes, error)

func (*Audit) Read

func (this *Audit) Read() error

type Audits

type Audits []*Audit

func (*Audits) Read

func (this *Audits) Read() error

type Change

type Change struct {
	Ident
	AuditId       int64     `db:"audit_id,omitempty"       json:"audit_id"`
	PropertyName  string    `db:"property_name,omitempty"  json:"property_name"`
	PreviousValue string    `db:"previous_value,omitempty" json:"previous_value"`
	CurrentValue  string    `db:"current_value,omitempty"  json:"current_value"`
	ChangeDate    time.Time `db:"change_date,omitempty"    json:"change_date"`
}

func (*Change) Create

func (this *Change) Create() (id int64, err error)

type Changes

type Changes []*Change

func (Changes) Create

func (this Changes) Create() (int64, error)

func (*Changes) Read

func (this *Changes) Read() error

func (*Changes) ReadByAuditId

func (this *Changes) ReadByAuditId() error

type Checkin

type Checkin struct {
	Ident
	Common
	CheckinDate time.Time `db:"checkin_date,omitempty"   json:"checkin_date"`
}

func (*Checkin) Create

func (this *Checkin) Create() (id int64, err error)

type Checkins

type Checkins []*Checkin

func (*Checkins) Read

func (this *Checkins) Read() error

type Common

type Common struct {
	VendorName   string `db:"vendor_name,omitempty"    json:"vendor_name"`
	ProductName  string `db:"product_name,omitempty"   json:"product_name"`
	ProductVer   string `db:"product_ver,omitempty"    json:"product_ver"`
	FirmwareVer  string `db:"firmware_ver,omitempty"   json:"firmware_ver"`
	SoftwareId   string `db:"software_id,omitempty"    json:"software_id"`
	PortNumber   int    `db:"port_number,omitempty"    json:"port_number"`
	BusNumber    int    `db:"bus_number,omitempty"     json:"bus_number"`
	BusAddress   int    `db:"bus_address,omitempty"    json:"bus_address"`
	BufferSize   int    `db:"buffer_size,omitempty"    json:"buffer_size"`
	MaxPktSize   int    `db:"max_pkt_size,omitempty"   json:"max_pkt_size"`
	USBSpec      string `db:"usb_spec,omitempty"       json:"usb_spec"`
	USBClass     string `db:"usb_class,omitempty"      json:"usb_class"`
	USBSubClass  string `db:"usb_subclass,omitempty"   json:"usb_subclass"`
	USBProtocol  string `db:"usb_protocol,omitempty"   json:"usb_protocol"`
	DeviceSpeed  string `db:"device_speed,omitempty"   json:"device_speed"`
	DeviceVer    string `db:"device_ver,omitempty"     json:"device_ver"`
	DeviceSN     string `db:"device_sn,omitempty"      json:"device_sn"`
	FactorySN    string `db:"factory_sn,omitempty"     json:"factory_sn"`
	DescriptorSN string `db:"descriptor_sn,omitempty"  json:"descriptor_sn"`
	ObjectType   string `db:"object_type,omitempty"    json:"object_type"`
	ObjectJSON   []byte `db:"object_json,omitempty"    json:"object_json"`
}

type Custom

type Custom struct {
	Custom01 string `db:"custom_01,omitempty"      json:"custom_01"`
	Custom02 string `db:"custom_02,omitempty"      json:"custom_02"`
	Custom03 string `db:"custom_03,omitempty"      json:"custom_03"`
	Custom04 string `db:"custom_04,omitempty"      json:"custom_04"`
	Custom05 string `db:"custom_05,omitempty"      json:"custom_05"`
	Custom06 string `db:"custom_06,omitempty"      json:"custom_06"`
	Custom07 string `db:"custom_07,omitempty"      json:"custom_07"`
	Custom08 string `db:"custom_08,omitempty"      json:"custom_08"`
	Custom09 string `db:"custom_09,omitempty"      json:"custom_09"`
	Custom10 string `db:"custom_10,omitempty"      json:"custom_10"`
}

type Ident

type Ident struct {
	Id         int64  `db:"id,omitempty"             json:"id"`
	VendorId   string `db:"vendor_id,omitempty"      json:"vendor_id"`
	ProductId  string `db:"product_id,omitempty"     json:"product_id"`
	SerialNum  string `db:"serial_number,omitempty"  json:"serial_number"`
	HostName   string `db:"host_name,omitempty"      json:"host_name"`
	RemoteAddr string `db:"remote_addr,omitempty"    json:"remote_addr"`
}

type Serialized

type Serialized struct {
	Ident
	Common
	FirstSeen time.Time `db:"first_seen,omitempty"     json:"first_seen"`
	LastSeen  time.Time `db:"last_seen,omitempty"      json:"last_seen"`
	Checkins  int       `db:"checkins,omitempty"       json:"checkins"`
}

func (*Serialized) Create

func (this *Serialized) Create() (id int64, err error)

func (*Serialized) JSON

func (this *Serialized) JSON() ([]byte, error)

func (*Serialized) Read

func (this *Serialized) Read() error

type SnRequest

type SnRequest struct {
	Ident
	Common
	RequestDate time.Time `db:"request_date,omitempty"   json:"request_date"`
}

func (*SnRequest) Create

func (this *SnRequest) Create() (id int64, err error)

func (*SnRequest) CreateWithSn

func (this *SnRequest) CreateWithSn(sn string) (int64, error)

func (*SnRequest) DeviceExists

func (this *SnRequest) DeviceExists() bool

func (*SnRequest) Read

func (this *SnRequest) Read() error

func (*SnRequest) Update

func (this *SnRequest) Update() (int64, error)

func (*SnRequest) UpdateWithSn

func (this *SnRequest) UpdateWithSn(sn string) (int64, error)

type Unserialized

type Unserialized struct {
	Ident
	Common
	FirstSeen time.Time `db:"first_seen,omitempty"     json:"first_seen"`
	LastSeen  time.Time `db:"last_seen,omitempty"      json:"last_seen"`
	Checkins  int       `db:"checkins,omitempty"       json:"checkins"`
}

func (*Unserialized) Create

func (this *Unserialized) Create() (id int64, err error)

func (*Unserialized) Read

func (this *Unserialized) Read() error

Jump to

Keyboard shortcuts

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