domain

package
v0.0.0-...-8ac8335 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2020 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

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

Jump to

Keyboard shortcuts

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