You've already forked golang-saas-starter-kit
mirror of
https://github.com/raseels-repos/golang-saas-starter-kit.git
synced 2025-06-15 00:15:15 +02:00
authenticator storage engines
Created a storage interface used by authenticator to support multiple types of storage types for private keys. Added a new file storage engine which is now the default for web-api. Migrated aws secrets manager to be optional.
This commit is contained in:
80
example-project/cmd/web-api/docs/docs.go
Normal file
80
example-project/cmd/web-api/docs/docs.go
Normal file
@ -0,0 +1,80 @@
|
||||
// GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
|
||||
// This file was generated by swaggo/swag at
|
||||
// 2019-06-24 15:42:25.999684 -0800 AKDT m=+0.030714022
|
||||
|
||||
package docs
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
|
||||
"github.com/alecthomas/template"
|
||||
"github.com/swaggo/swag"
|
||||
)
|
||||
|
||||
var doc = `{
|
||||
"swagger": "2.0",
|
||||
"info": {
|
||||
"description": "This is a sample server celler server.",
|
||||
"title": "SaaS Example API",
|
||||
"termsOfService": "http://geeksinthewoods.com/terms",
|
||||
"contact": {
|
||||
"name": "API Support",
|
||||
"url": "https://gitlab.com/geeks-accelerator/oss/saas-starter-kit",
|
||||
"email": "support@geeksinthewoods.com"
|
||||
},
|
||||
"license": {
|
||||
"name": "Apache 2.0",
|
||||
"url": "http://www.apache.org/licenses/LICENSE-2.0.html"
|
||||
},
|
||||
"version": "{{.Version}}"
|
||||
},
|
||||
"host": "{{.Host}}",
|
||||
"basePath": "{{.BasePath}}",
|
||||
"paths": {},
|
||||
"securityDefinitions": {
|
||||
"ApiKeyAuth": {
|
||||
"type": "apiKey",
|
||||
"name": "Authorization",
|
||||
"in": "header"
|
||||
},
|
||||
"BasicAuth": {
|
||||
"type": "basic"
|
||||
},
|
||||
"OAuth2Password": {
|
||||
"type": "oauth2",
|
||||
"flow": "password",
|
||||
"tokenUrl": "https://example.com/v1/oauth/token"
|
||||
}
|
||||
}
|
||||
}`
|
||||
|
||||
type swaggerInfo struct {
|
||||
Version string
|
||||
Host string
|
||||
BasePath string
|
||||
Title string
|
||||
Description string
|
||||
}
|
||||
|
||||
// SwaggerInfo holds exported Swagger Info so clients can modify it
|
||||
var SwaggerInfo swaggerInfo
|
||||
|
||||
type s struct{}
|
||||
|
||||
func (s *s) ReadDoc() string {
|
||||
t, err := template.New("swagger_info").Parse(doc)
|
||||
if err != nil {
|
||||
return doc
|
||||
}
|
||||
|
||||
var tpl bytes.Buffer
|
||||
if err := t.Execute(&tpl, SwaggerInfo); err != nil {
|
||||
return doc
|
||||
}
|
||||
|
||||
return tpl.String()
|
||||
}
|
||||
|
||||
func init() {
|
||||
swag.Register(swag.Name, &s{})
|
||||
}
|
36
example-project/cmd/web-api/docs/swagger.json
Normal file
36
example-project/cmd/web-api/docs/swagger.json
Normal file
@ -0,0 +1,36 @@
|
||||
{
|
||||
"swagger": "2.0",
|
||||
"info": {
|
||||
"description": "This is a sample server celler server.",
|
||||
"title": "SaaS Example API",
|
||||
"termsOfService": "http://geeksinthewoods.com/terms",
|
||||
"contact": {
|
||||
"name": "API Support",
|
||||
"url": "https://gitlab.com/geeks-accelerator/oss/saas-starter-kit",
|
||||
"email": "support@geeksinthewoods.com"
|
||||
},
|
||||
"license": {
|
||||
"name": "Apache 2.0",
|
||||
"url": "http://www.apache.org/licenses/LICENSE-2.0.html"
|
||||
},
|
||||
"version": "{{.Version}}"
|
||||
},
|
||||
"host": "{{.Host}}",
|
||||
"basePath": "{{.BasePath}}",
|
||||
"paths": {},
|
||||
"securityDefinitions": {
|
||||
"ApiKeyAuth": {
|
||||
"type": "apiKey",
|
||||
"name": "Authorization",
|
||||
"in": "header"
|
||||
},
|
||||
"BasicAuth": {
|
||||
"type": "basic"
|
||||
},
|
||||
"OAuth2Password": {
|
||||
"type": "oauth2",
|
||||
"flow": "password",
|
||||
"tokenUrl": "https://example.com/v1/oauth/token"
|
||||
}
|
||||
}
|
||||
}
|
27
example-project/cmd/web-api/docs/swagger.yaml
Normal file
27
example-project/cmd/web-api/docs/swagger.yaml
Normal file
@ -0,0 +1,27 @@
|
||||
basePath: '{{.BasePath}}'
|
||||
host: '{{.Host}}'
|
||||
info:
|
||||
contact:
|
||||
email: support@geeksinthewoods.com
|
||||
name: API Support
|
||||
url: https://gitlab.com/geeks-accelerator/oss/saas-starter-kit
|
||||
description: This is a sample server celler server.
|
||||
license:
|
||||
name: Apache 2.0
|
||||
url: http://www.apache.org/licenses/LICENSE-2.0.html
|
||||
termsOfService: http://geeksinthewoods.com/terms
|
||||
title: SaaS Example API
|
||||
version: '{{.Version}}'
|
||||
paths: {}
|
||||
securityDefinitions:
|
||||
ApiKeyAuth:
|
||||
in: header
|
||||
name: Authorization
|
||||
type: apiKey
|
||||
BasicAuth:
|
||||
type: basic
|
||||
OAuth2Password:
|
||||
flow: password
|
||||
tokenUrl: https://example.com/v1/oauth/token
|
||||
type: oauth2
|
||||
swagger: "2.0"
|
Reference in New Issue
Block a user