github.com/uvalib/orcid-access-ws@v0.0.0-20250612130209-7d062dbabf9d/orcidaccessws/dao/datastore.go (about) 1 package dao 2 3 import ( 4 // needed 5 _ "github.com/go-sql-driver/mysql" 6 "github.com/uvalib/orcid-access-ws/orcidaccessws/api" 7 ) 8 9 // our storage interface 10 type Storage interface { 11 Check() error 12 GetAllOrcidAttributes() ([]*api.OrcidAttributes, error) 13 GetOrcidAttributesByCid(id string) ([]*api.OrcidAttributes, error) 14 DelOrcidAttributesByCid(id string) error 15 SetOrcidAttributesByCid(id string, attributes api.OrcidAttributes) error 16 //Destroy() error 17 } 18 19 // our singleton store 20 var Store Storage 21 22 // our factory 23 func NewDatastore() error { 24 var err error 25 // mock implementation here 26 Store, err = newDBStore() 27 return err 28 } 29 30 // 31 // end of file 32 //