Documentation ¶
Index ¶
- Variables
- func DeleteBook(ctx context.Context, name string) error
- func GetBookByName(ctx context.Context, name string) interface{}
- func GetBooks(ctx context.Context, limit int) interface{}
- func HttpResponseError(w http.ResponseWriter, r *http.Request, data interface{}, code int)
- func HttpResponseSuccess(w http.ResponseWriter, r *http.Request, data interface{})
- func InsertBook(ctx context.Context, book Book) error
- func RegisterRoutes(router *chi.Mux) *chi.Mux
- func UpdateBook(ctx context.Context, updBook Book) error
- type Book
- type SetResponse
Constants ¶
This section is empty.
Variables ¶
View Source
var (
Schema, _ = graphql.NewSchema(
graphql.SchemaConfig{
Query: queryType,
Mutation: mutationType,
},
)
)
Functions ¶
func GetBookByName ¶
func HttpResponseError ¶
func HttpResponseError(w http.ResponseWriter, r *http.Request, data interface{}, code int)
func HttpResponseSuccess ¶
func HttpResponseSuccess(w http.ResponseWriter, r *http.Request, data interface{})
func InsertBook ¶
TODO do not return error TODO return book
func RegisterRoutes ¶
TODO try to remove return '*chi.Mux'
Types ¶
type SetResponse ¶
Click to show internal directories.
Click to hide internal directories.