swagger

package
v0.0.0-...-1037a2b Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2021 License: MIT Imports: 6 Imported by: 0

README

Go API Server for swagger

A go-lang API to manage chores (repeating) and todo items (once-off) for my household.

Overview

This server was generated by the [swagger-codegen] (https://github.com/swagger-api/swagger-codegen) project.
By using the OpenAPI-Spec from a remote server, you can easily generate a server stub.

To see how to make this your own, look here:

README

  • API version: 0.0.1
  • Build date: 2021-07-31T20:28:41.047Z[GMT]
Running the server

To run the server, follow these simple steps:

go run main.go

Documentation

Overview

* SmightTasksAPI * * A go-lang API to manage chores (repeating) and todo items (once-off) for my household. * * API version: 0.0.1 * Contact: jayandrinsmart@gmail.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* SmightTasksAPI * * A go-lang API to manage chores (repeating) and todo items (once-off) for my household. * * API version: 0.0.1 * Contact: jayandrinsmart@gmail.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* SmightTasksAPI * * A go-lang API to manage chores (repeating) and todo items (once-off) for my household. * * API version: 0.0.1 * Contact: jayandrinsmart@gmail.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* SmightTasksAPI * * A go-lang API to manage chores (repeating) and todo items (once-off) for my household. * * API version: 0.0.1 * Contact: jayandrinsmart@gmail.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* SmightTasksAPI * * A go-lang API to manage chores (repeating) and todo items (once-off) for my household. * * API version: 0.0.1 * Contact: jayandrinsmart@gmail.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* SmightTasksAPI * * A go-lang API to manage chores (repeating) and todo items (once-off) for my household. * * API version: 0.0.1 * Contact: jayandrinsmart@gmail.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* SmightTasksAPI * * A go-lang API to manage chores (repeating) and todo items (once-off) for my household. * * API version: 0.0.1 * Contact: jayandrinsmart@gmail.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddTask

func AddTask(w http.ResponseWriter, r *http.Request)

func CreateUser

func CreateUser(w http.ResponseWriter, r *http.Request)

func DeleteTask

func DeleteTask(w http.ResponseWriter, r *http.Request)

func DeleteUser

func DeleteUser(w http.ResponseWriter, r *http.Request)

func FindTasksByStatus

func FindTasksByStatus(w http.ResponseWriter, r *http.Request)

func FindTasksByUser

func FindTasksByUser(w http.ResponseWriter, r *http.Request)

func GetTaskById

func GetTaskById(w http.ResponseWriter, r *http.Request)

func GetTasks

func GetTasks(w http.ResponseWriter, r *http.Request)

func GetUserByName

func GetUserByName(w http.ResponseWriter, r *http.Request)

func Index

func Index(w http.ResponseWriter, r *http.Request)

func Logger

func Logger(inner http.Handler, name string) http.Handler

func NewRouter

func NewRouter() *mux.Router

func UpdateTask

func UpdateTask(w http.ResponseWriter, r *http.Request)

func UpdateTaskWithForm

func UpdateTaskWithForm(w http.ResponseWriter, r *http.Request)

func UpdateUser

func UpdateUser(w http.ResponseWriter, r *http.Request)

Types

type ApiResponse

type ApiResponse struct {
	Code int32 `json:"code,omitempty"`

	Type_ string `json:"type,omitempty"`

	Message string `json:"message,omitempty"`
}

type Route

type Route struct {
	Name        string
	Method      string
	Pattern     string
	HandlerFunc http.HandlerFunc
}

type Routes

type Routes []Route

type Task

type Task struct {
	Id int64 `json:"id,omitempty"`

	Title string `json:"title"`
	// True for tasks which are ongoing/repeating
	Repeating bool `json:"repeating"`

	Users []User `json:"users,omitempty"`
	// current status of the task
	Status string `json:"status,omitempty"`
}

type User

type User struct {
	Id int64 `json:"id,omitempty"`

	Username string `json:"username,omitempty"`

	FirstName string `json:"firstName,omitempty"`

	LastName string `json:"lastName,omitempty"`

	Email string `json:"email,omitempty"`

	Password string `json:"password,omitempty"`

	Phone string `json:"phone,omitempty"`
	// User Status
	UserStatus int32 `json:"userStatus,omitempty"`
}

Jump to

Keyboard shortcuts

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