Documentation ¶ Index ¶ func NewDomainRepo(db *sql.DB) *domainRepo func NewRouter(db *sql.DB) *chi.Mux type Domain type DomainRepo Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ func NewDomainRepo ¶ func NewDomainRepo(db *sql.DB) *domainRepo NewDomainRepo returns a struct that implements domain repo with a database connection func NewRouter ¶ func NewRouter(db *sql.DB) *chi.Mux NewRouter returns a mux router Types ¶ type Domain ¶ type Domain struct { Id int `json:"id,omitempty"` // Name is the domain address Name string `json:"name"` Created string `json:"created,omitempty"` EnvironmentID int `json:"environment_id"` ConservationID int `json:"conservation_id"` } Domain represents an domain type DomainRepo ¶ type DomainRepo interface { ListDomain() ([]*Domain, error) GetDomain(id int) (*Domain, error) DeleteDomain(id int) error InsertDomain(*Domain) error } DomainRepo is the interface to implements in order to manage domain address Source Files ¶ View all Source files domain.go repo.go Click to show internal directories. Click to hide internal directories.