Documentation ¶
Index ¶
- func DoGet(uri string, args ...string) (status int, rv string)
- func FindTagId(hdlr *Acb1Type, premis_id, premis_animal string) (string, error)
- func KeeackHash(b []byte) []byte
- func SerializeAnimal(dt DataSetHashed) []byte
- func SerializeDataToBeHashed(dt DataToBeHashed) []byte
- type Acb1Type
- func (hdlr *Acb1Type) GetAllRows(tag string) (rowData string, err error)
- func (hdlr *Acb1Type) GetCowDisplayData(tag string) (dataJsonString string, err error)
- func (hdlr *Acb1Type) GetMostRecentHash(tag string) (hash, ord_seq, qr_enc_id string, err error)
- func (hdlr *Acb1Type) InitializeWithConfigData(next http.Handler, gCfg *cfg.ServerGlobalConfigType, serverName string, ...) (err error)
- func (hdlr *Acb1Type) InsertTrackAdd(tag, note string) (string, error)
- func (hdlr *Acb1Type) PreValidate(gCfg *cfg.ServerGlobalConfigType, cfgData map[string]interface{}, ...) (err error)
- func (hdlr *Acb1Type) PullQRFromDB(tag string) (qr_enc_id string, err error)
- func (hdlr *Acb1Type) ServeHTTP(www http.ResponseWriter, req *http.Request)
- func (hdlr *Acb1Type) SetupServer()
- func (hdlr *Acb1Type) SetupValidEvents()
- func (hdlr *Acb1Type) UpdateAnimalWithQR(tag, qrId string) error
- func (hdlr *Acb1Type) UpdateHashCurrentRow(tag, max_ord_seq, newHash string) (err error)
- func (hdlr *Acb1Type) UpdateQRMarkAsUsed(qrId string) error
- type DataDisplayType
- type DataSetHashed
- type DataToBeHashed
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DoGet ¶
Modified to send Header!
--------------------------------------------- // Xyzzy101 - Setup QR Redirect ---------------------------------------------
export QR_SHORT_AUTH_TOKEN="w4h0wvtb1zk4uf8Xv.Ns9Q7j8" wget -o out/,list1 -O out/,list2 \ --header "X-Qr-Auth: ${QR_SHORT_AUTH_TOKEN}" \ "http://t432z.com/upd/?url=http://test.test.com&id=5c" -- 1. DoGet - change to create a header -- 2. Example Call to set this
func KeeackHash ¶
func SerializeAnimal ¶
func SerializeAnimal(dt DataSetHashed) []byte
func SerializeDataToBeHashed ¶
func SerializeDataToBeHashed(dt DataToBeHashed) []byte
Types ¶
type Acb1Type ¶
type Acb1Type struct { Next http.Handler // Paths []string // AuthKey string // (acb) RedisPrefix string // InputPath string // OutputPath string // OutputURL string // DisplayURL string // URL to display results - destination of QR redirect LineNo int // // contains filtered or unexported fields }
func NewAcb1TypeServer ¶
NewAcb1TypeServer will create a copy of the server for testing.
func (*Acb1Type) GetAllRows ¶
data, err := hdlr.GetAllRows(tag)
func (*Acb1Type) GetCowDisplayData ¶
func (*Acb1Type) GetMostRecentHash ¶
func (*Acb1Type) InitializeWithConfigData ¶
func (*Acb1Type) InsertTrackAdd ¶
func (*Acb1Type) PreValidate ¶
func (*Acb1Type) PullQRFromDB ¶
err = hdlr.PullQRFromDB(rr.Tag)
func (*Acb1Type) ServeHTTP ¶
func (hdlr *Acb1Type) ServeHTTP(www http.ResponseWriter, req *http.Request)
func (*Acb1Type) SetupServer ¶
func (hdlr *Acb1Type) SetupServer()
func (*Acb1Type) SetupValidEvents ¶
func (hdlr *Acb1Type) SetupValidEvents()
func (*Acb1Type) UpdateAnimalWithQR ¶
func (*Acb1Type) UpdateHashCurrentRow ¶
hdlr.UpdateHashCurrentRow(tag, max_ord_seq, newHash)
func (*Acb1Type) UpdateQRMarkAsUsed ¶
type DataDisplayType ¶
type DataDisplayType struct { Cow string Ranch string SlaughterHouse string Aged string DryAged string }
-------------------------------------------------------------- cowData := GetCowDisplayData(rr.Tag) // xyzzy --------------------------------------------------------------
{ "Cow": "rfid: 111"
, "Ranch": "Ranch: RC" , "SlaughterHouse": "Wyoming Beef Lab" , "Aged": "Aged: 14 days" , "DryAged": "" }
type DataSetHashed ¶
type DataSetHashed []DataToBeHashed
Click to show internal directories.
Click to hide internal directories.