You've already forked golang-saas-starter-kit
mirror of
https://github.com/raseels-repos/golang-saas-starter-kit.git
synced 2025-06-21 00:29:46 +02:00
Completed signup package and hooked up to web-api. Can use the swagger
ui to signup a new account.
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
// GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
|
||||
// This file was generated by swaggo/swag at
|
||||
// 2019-06-24 20:15:37.524606 -0800 AKDT m=+13.872100491
|
||||
// 2019-06-25 02:19:21.144417 -0800 AKDT m=+51.040366621
|
||||
|
||||
package docs
|
||||
|
||||
@ -16,10 +16,10 @@ var doc = `{
|
||||
"info": {
|
||||
"description": "This is a sample server celler server.",
|
||||
"title": "SaaS Example API",
|
||||
"termsOfService": "/terms",
|
||||
"termsOfService": "http://example.com/terms",
|
||||
"contact": {
|
||||
"name": "API Support",
|
||||
"url": "/support",
|
||||
"url": "http://example.com/support",
|
||||
"email": "support@geeksinthewoods.com"
|
||||
},
|
||||
"license": {
|
||||
@ -40,6 +40,9 @@ var doc = `{
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"account"
|
||||
],
|
||||
"summary": "Read returns the specified account from the system.",
|
||||
"operationId": "get-string-by-int",
|
||||
"parameters": [
|
||||
@ -88,6 +91,123 @@ var doc = `{
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/signup": {
|
||||
"post": {
|
||||
"description": "Signup creates a new account and user in the system.",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"signup"
|
||||
],
|
||||
"summary": "Signup handles new account creation.",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "Signup details",
|
||||
"name": "data",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/signup.SignupRequest"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/signup.SignupResponse"
|
||||
},
|
||||
"headers": {
|
||||
"Token": {
|
||||
"type": "string",
|
||||
"description": "qwerty"
|
||||
}
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/web.Error"
|
||||
}
|
||||
},
|
||||
"403": {
|
||||
"description": "Forbidden",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/web.Error"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/users/{id}": {
|
||||
"get": {
|
||||
"description": "get string by ID",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"user"
|
||||
],
|
||||
"summary": "Read returns the specified user from the system.",
|
||||
"operationId": "get-string-by-int",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "User ID",
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/user.User"
|
||||
},
|
||||
"headers": {
|
||||
"Token": {
|
||||
"type": "string",
|
||||
"description": "qwerty"
|
||||
}
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/web.Error"
|
||||
}
|
||||
},
|
||||
"403": {
|
||||
"description": "Forbidden",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/web.Error"
|
||||
}
|
||||
},
|
||||
"404": {
|
||||
"description": "Not Found",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/web.Error"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"definitions": {
|
||||
@ -95,10 +215,12 @@ var doc = `{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"address1": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"example": "221 Tatitlek Ave"
|
||||
},
|
||||
"address2": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"example": "Box #1832"
|
||||
},
|
||||
"archived_at": {
|
||||
"type": "string"
|
||||
@ -107,36 +229,166 @@ var doc = `{
|
||||
"type": "string"
|
||||
},
|
||||
"city": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"example": "Valdez"
|
||||
},
|
||||
"country": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"example": "USA"
|
||||
},
|
||||
"created_at": {
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"example": "c4653bf9-5978-48b7-89c5-95704aebb7e2"
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"example": "Company Name"
|
||||
},
|
||||
"region": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"example": "AK"
|
||||
},
|
||||
"signup_user_id": {
|
||||
"type": "string"
|
||||
},
|
||||
"status": {
|
||||
"type": "AccountStatus"
|
||||
"type": "string",
|
||||
"example": "active"
|
||||
},
|
||||
"timezone": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"example": "America/Anchorage"
|
||||
},
|
||||
"updated_at": {
|
||||
"type": "string"
|
||||
},
|
||||
"zipcode": {
|
||||
"type": "string",
|
||||
"example": "99686"
|
||||
}
|
||||
}
|
||||
},
|
||||
"signup.SignupRequest": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"account": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"name",
|
||||
"address1",
|
||||
"city",
|
||||
"region",
|
||||
"country",
|
||||
"zipcode"
|
||||
],
|
||||
"properties": {
|
||||
"address1": {
|
||||
"type": "string",
|
||||
"example": "221 Tatitlek Ave"
|
||||
},
|
||||
"address2": {
|
||||
"type": "string",
|
||||
"example": "Box #1832"
|
||||
},
|
||||
"city": {
|
||||
"type": "string",
|
||||
"example": "Valdez"
|
||||
},
|
||||
"country": {
|
||||
"type": "string",
|
||||
"example": "USA"
|
||||
},
|
||||
"name": {
|
||||
"type": "string",
|
||||
"example": "Company {RANDOM_UUID}"
|
||||
},
|
||||
"region": {
|
||||
"type": "string",
|
||||
"example": "AK"
|
||||
},
|
||||
"timezone": {
|
||||
"type": "string",
|
||||
"example": "America/Anchorage"
|
||||
},
|
||||
"zipcode": {
|
||||
"type": "string",
|
||||
"example": "99686"
|
||||
}
|
||||
}
|
||||
},
|
||||
"user": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"name",
|
||||
"email",
|
||||
"password"
|
||||
],
|
||||
"properties": {
|
||||
"email": {
|
||||
"type": "string",
|
||||
"example": "{RANDOM_EMAIL}"
|
||||
},
|
||||
"name": {
|
||||
"type": "string",
|
||||
"example": "Gabi May"
|
||||
},
|
||||
"password": {
|
||||
"type": "string",
|
||||
"example": "SecretString"
|
||||
},
|
||||
"password_confirm": {
|
||||
"type": "string",
|
||||
"example": "SecretString"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"signup.SignupResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"account": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/account.Account"
|
||||
},
|
||||
"user": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/user.User"
|
||||
}
|
||||
}
|
||||
},
|
||||
"user.User": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"name"
|
||||
],
|
||||
"properties": {
|
||||
"archived_at": {
|
||||
"type": "string"
|
||||
},
|
||||
"created_at": {
|
||||
"type": "string"
|
||||
},
|
||||
"email": {
|
||||
"type": "string",
|
||||
"example": "gabi@geeksinthewoods.com"
|
||||
},
|
||||
"id": {
|
||||
"type": "string",
|
||||
"example": "d69bdef7-173f-4d29-b52c-3edc60baf6a2"
|
||||
},
|
||||
"name": {
|
||||
"type": "string",
|
||||
"example": "Gabi May"
|
||||
},
|
||||
"timezone": {
|
||||
"type": "string",
|
||||
"example": "America/Anchorage"
|
||||
},
|
||||
"updated_at": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user