options

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler interface {
	List(ctx *gin.Context)
	Find(ctx *gin.Context)
	UpdateCreate(ctx *gin.Context)
}

Handler defines methods for categories to interact with the server.

type Options

type Options struct {
	*deps.Deps
}

Options defines the handler for all options routes.

func New

func New(d *deps.Deps) *Options

New

Creates a new options handler.

func (*Options) Find

func (o *Options) Find(ctx *gin.Context)

Find

Returns http.StatusOK if there are no options or success. Returns http.StatusBadRequest if there was name param was missing. Returns http.StatusInternalServerError if there was an error getting the options.

func (*Options) List

func (o *Options) List(ctx *gin.Context)

List

Returns http.StatusOK if there are no options or success. Returns http.StatusInternalServerError if there was an error getting the options.

func (*Options) UpdateCreate

func (o *Options) UpdateCreate(ctx *gin.Context)

UpdateCreate

Restarts the server at the end of the request to flush options.

Returns http.StatusOK if the options was created/updated. Returns http.StatusBadRequest if the validation failed on both structs. Returns http.StatusInternalServerError if there was an error updating/creating the options.

Jump to

Keyboard shortcuts

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