Documentation ¶
Index ¶
- Variables
- func WithAuthorizer(auth string) optionFunc
- type Fact
- type FactRepo
- type Option
- type Service
- func (s *Service) FactHandler(w http.ResponseWriter, r *http.Request)
- func (s *Service) FactsHandler(w http.ResponseWriter, r *http.Request)
- func (s *Service) RespondErrorJSON(w http.ResponseWriter, code int, err error)
- func (s *Service) RespondJSON(w http.ResponseWriter, code int, envelope map[string]any)
- func (s *Service) Routes() *httprouter.Router
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrNotFound = errors.New("not found")
)
Functions ¶
func WithAuthorizer ¶
func WithAuthorizer(auth string) optionFunc
Types ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func (*Service) FactHandler ¶
func (s *Service) FactHandler(w http.ResponseWriter, r *http.Request)
func (*Service) FactsHandler ¶
func (s *Service) FactsHandler(w http.ResponseWriter, r *http.Request)
func (*Service) RespondErrorJSON ¶
func (s *Service) RespondErrorJSON(w http.ResponseWriter, code int, err error)
func (*Service) RespondJSON ¶
func (*Service) Routes ¶
func (s *Service) Routes() *httprouter.Router
Click to show internal directories.
Click to hide internal directories.