swagger

package
v0.0.0-...-f210498 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2019 License: Apache-2.0 Imports: 6 Imported by: 0

README

Go API Server for swagger

Blockchain

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: 1.0.0
  • Build date: 2019-12-13T10:20:29.771Z
Running the server

To run the server, follow these simple steps:

go run main.go

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddAccount

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

func AdminLogin

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

func CreateUser

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

func DeleteAccount

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

func DeleteAccountByAdmin

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

func FinancingByID

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

func GetAccountByID

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

func GetAccountsByAdmin

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

func GetAllAccount

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

func GetCompanysByAdmin

func GetCompanysByAdmin(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 QueryUser

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

func SetCompany

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

func TransferAccount

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

func UpdateUser

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

Types

type Account

type Account struct {
	Id int32 `json:"id,omitempty"`

	Money int32 `json:"money,omitempty"`

	ACompany int32 `json:"ACompany,omitempty"`

	BCompany int32 `json:"BCompany,omitempty"`
}

type Admin

type Admin struct {
	Username string `json:"username,omitempty"`

	Password string `json:"password,omitempty"`
}

type Company

type Company struct {
	Id int32 `json:"id,omitempty"`

	Name string `json:"name,omitempty"`

	Trusty bool `json:"trusty,omitempty"`

	Money int32 `json:"money,omitempty"`
}

type Route

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

type Routes

type Routes []Route

type User

type User struct {
	Username string `json:"username,omitempty"`

	Password string `json:"password,omitempty"`

	Company *Company `json:"company,omitempty"`
}

Jump to

Keyboard shortcuts

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