models

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2022 License: GPL-3.0 Imports: 8 Imported by: 0

README

Go API Server for models

API to store contamination events and data from different sources

Overview

This server was generated by the [openapi-generator] (https://openapi-generator.tech) 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: 1.0.0
  • Build date: 2022-10-19T09:32:54.679095-05:00[America/Mexico_City]
Running the server

To run the server, follow these simple steps:

go run main.go

To run the server in a docker container

docker build --network=host -t models .

Once the image is built, just run

docker run --rm -it models
Known Issue

Endpoints sharing a common path may result in issues. For example, /v2/pet/findByTags and /v2/pet/:petId will result in an issue with the Gin framework. For more information about this known limitation, please refer to gin-gonic/gin#388 for more information.

A workaround is to manually update the path and handler. Please refer to gin-gonic/gin/issues/205#issuecomment-296155497 for more information.

Documentation

Index

Constants

View Source
const (
	UUID        = "uuid"
	BUNDLEPARAM = "bundleId"
)
View Source
const (
	INDEXCONTENT = `` /* 750-byte string literal not displayed */

	NOTFOUND = `` /* 502-byte string literal not displayed */

)

Variables

This section is empty.

Functions

func CreateBundle

func CreateBundle(c *gin.Context)

CreateBundle - Upload bundle from device

func CreateUser

func CreateUser(c *gin.Context)

CreateUser - Create user

func CreateUsersWithListInput

func CreateUsersWithListInput(c *gin.Context)

CreateUsersWithListInput - Creates list of users with given input array

func DeleteUser

func DeleteUser(c *gin.Context)

DeleteUser - Delete user

func GetBundleStatus

func GetBundleStatus(c *gin.Context)

GetBundleStatus - Get user by user name

func GetUserByName

func GetUserByName(c *gin.Context)

GetUserByName - Get user by user name

func Index

func Index(c *gin.Context)

Index is the index handler.

func LoginUser

func LoginUser(c *gin.Context)

LoginUser - Logs user into the system

func LogoutUser

func LogoutUser(c *gin.Context)

LogoutUser - Logs out current logged in user session

func NewRouter

func NewRouter(middleware ...gin.HandlerFunc) *gin.Engine

NewRouter returns a new router.

func UpdateUser

func UpdateUser(c *gin.Context)

UpdateUser - Update user

Types

type ApiResponse

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

	Type string `json:"type,omitempty"`

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

type Bundle

type Bundle struct {
	Id string `json:"id,omitempty"`

	// Bundle Status
	BundleStatus string `json:"bundleStatus,omitempty"`
}

type Route

type Route struct {
	// Name is the name of this Route.
	Name string
	// Method is the string for the HTTP method. ex) GET, POST etc..
	Method string
	// Pattern is the pattern of the URI.
	Pattern string
	// HandlerFunc is the handler function of this route.
	HandlerFunc gin.HandlerFunc
}

Route is the information for every URI.

type Routes

type Routes []Route

Routes is the list of the generated Route.

type Tag

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

	Name string `json:"name,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