Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConfigFile ¶
type OperationEndpoints ¶
type OperationEndpoints interface { GetOperation(idParam string) func(w http.ResponseWriter, r *http.Request) CreateOperation() func(w http.ResponseWriter, r *http.Request) ListOperations() func(w http.ResponseWriter, r *http.Request) ListPersonOperations(idParam string) func(w http.ResponseWriter, r *http.Request) UpdateOperation(idParam string) func(w http.ResponseWriter, r *http.Request) DeleteOperation(personid string, operationid string) func(w http.ResponseWriter, r *http.Request) }
func NewEndpointsOperationFactory ¶
func NewEndpointsOperationFactory(operationStore OperationStore) OperationEndpoints
type OperationStore ¶
type OperationStore interface { CreateOperation(operation *Operation) (*Operation, error) DeleteOperation(id int) error UpdateOperation(id int, operation *Operation) (*Operation, error) ListOperations() ([]*Operation, error) ListPersonOperations(id int) ([]*Operation, error) GetOperation(id int) (*Operation, error) }
func NewPostgreOperationStore ¶
func NewPostgreOperationStore(configfile *ConfigFile) (OperationStore, error)
type PersonEndpoints ¶
type PersonEndpoints interface { GetPerson(idParam string) func(w http.ResponseWriter, r *http.Request) CreatePerson() func(w http.ResponseWriter, r *http.Request) ListPersons() func(w http.ResponseWriter, r *http.Request) UpdatePerson(idParam string) func(w http.ResponseWriter, r *http.Request) DeletePerson(idParam string) func(w http.ResponseWriter, r *http.Request) }
func NewEndpointsPersonFactory ¶
func NewEndpointsPersonFactory(personStore PersonStore) PersonEndpoints
type PersonStore ¶
type PersonStore interface { CreatePerson(person *Person) (*Person, error) DeletePerson(id int) error UpdatePerson(id int, person *Person) (*Person, error) ListPersons() ([]*Person, error) GetPerson(id int) (*Person, error) }
func NewPostgrePersonStore ¶
func NewPostgrePersonStore(configfile *ConfigFile) (PersonStore, error)
type PhotoEndpoints ¶
type PhotoEndpoints interface { GetPhoto(idParam string) func(w http.ResponseWriter, r *http.Request) CreatePhoto(personid string, operationid string) func(w http.ResponseWriter, r *http.Request) ListPhotos() func(w http.ResponseWriter, r *http.Request) ListPersonPhotos(idParam string) func(w http.ResponseWriter, r *http.Request) ListOperationPhotos(idParam string) func(w http.ResponseWriter, r *http.Request) UpdatePhoto(idParam string) func(w http.ResponseWriter, r *http.Request) DeletePhoto(idParam string) func(w http.ResponseWriter, r *http.Request) }
func NewEndpointsPhotoFactory ¶
func NewEndpointsPhotoFactory(photoStore PhotoStore) PhotoEndpoints
type PhotoStore ¶
type PhotoStore interface { CreatePhoto(photo *Photo) (*Photo, error) GetPhoto(id int) (*Photo, error) ListPhotos() ([]*Photo, error) ListOperationPhotos(id int) ([]*Photo, error) ListPersonPhotos(id int) ([]*Photo, error) UpdatePhoto(id int, photo *Photo) (*Photo, error) DeletePhoto(id int) error }
func NewPostgrePhotoStore ¶
func NewPostgrePhotoStore(configfile *ConfigFile) (PhotoStore, error)
Click to show internal directories.
Click to hide internal directories.