diff options
| author | Mitchell Riedstra <mitch@riedstra.dev> | 2021-08-24 22:25:40 -0400 |
|---|---|---|
| committer | Mitchell Riedstra <mitch@riedstra.dev> | 2021-08-24 22:25:40 -0400 |
| commit | 0fc3eda77004f41c5f0a804028da2d90b0373ea7 (patch) | |
| tree | edf6d74e6a2b7140350eab1e40d0fbf70e10f87c /cmd/web/main.go | |
| parent | f4fcd237b2d0eb950fc15a8af1fb0894b6ad6359 (diff) | |
| download | steam-export-0fc3eda77004f41c5f0a804028da2d90b0373ea7.tar.gz steam-export-0fc3eda77004f41c5f0a804028da2d90b0373ea7.tar.xz | |
Another development snapshot. Updated license. Added Swagger documentation--embedded! Note about 'swaggo'
Diffstat (limited to 'cmd/web/main.go')
| -rw-r--r-- | cmd/web/main.go | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/cmd/web/main.go b/cmd/web/main.go index fdefa1b..1e29e27 100644 --- a/cmd/web/main.go +++ b/cmd/web/main.go @@ -12,6 +12,9 @@ import ( "strings" ) +// Generate our swagger docs +//go:generate swag init --parseDependency + var ( // Version is overridden by the build script Version = "Development" @@ -24,9 +27,27 @@ var ( StaticFS embed.FS //go:embed templates/* TemplateFS embed.FS - //indexTemplate string ) +// @title Steam Exporter API +// @version 1.0 +// @description The steam exporter is designed to make it easy to export steam games across the network. + +// @contact.name Mitchell Riedstra +// @contact.url https://riedstra.dev/steam-export +// @contact.email steam-export@riedstra.dev + +// @license.name ISC +// @license.url https://opensource.org/licenses/ISC + +// @host localhost:8899 +// @BasePath /api/v1 + +// @securityDefinitions.basic BasicAuth + +// @securityDefinitions.apikey ApiKeyAuth +// @in header +// @name Authorization func main() { fl := flag.NewFlagSet("steam-export", flag.ExitOnError) debug := fl.Bool("d", false, "Print line numbers in log") |
