This repository has been archived by the owner on Dec 12, 2024. It is now read-only.
generated from TBD54566975/tbd-project-template
-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add: openAPI doc * fix: magefile * add: annotation * add: annotation * rm * generate spec yaml by swaggo * run mod tidy * fix: review * update to latest ssi sdk; install swag if not present Co-authored-by: Gabe Cohen <[email protected]>
- Loading branch information
Showing
13 changed files
with
952 additions
and
647 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
FROM golang:1.17-alpine AS build | ||
|
||
WORKDIR /app | ||
|
||
ENV SWAGGER_VERSION=v0.29.0 | ||
ENV REPO="github.com/go-swagger/go-swagger/cmd/swagger" | ||
|
||
COPY go.mod ./ | ||
COPY go.sum ./ | ||
RUN go mod download | ||
|
||
RUN go get -u "${REPO}@${SWAGGER_VERSION}" | ||
|
||
ENTRYPOINT ["swagger"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,16 +3,17 @@ package main | |
import ( | ||
"context" | ||
"expvar" | ||
"github.com/ardanlabs/conf" | ||
"github.com/pkg/errors" | ||
"github.com/sirupsen/logrus" | ||
"github.com/tbd54566975/ssi-service/config" | ||
"github.com/tbd54566975/ssi-service/pkg/server" | ||
"net/http" | ||
"os" | ||
"os/signal" | ||
"syscall" | ||
"time" | ||
|
||
"github.com/ardanlabs/conf" | ||
"github.com/pkg/errors" | ||
"github.com/sirupsen/logrus" | ||
"github.com/tbd54566975/ssi-service/config" | ||
"github.com/tbd54566975/ssi-service/pkg/server" | ||
) | ||
|
||
const ( | ||
|
@@ -28,6 +29,15 @@ func init() { | |
logrus.SetOutput(os.Stdout) | ||
} | ||
|
||
// @title SSI Service API | ||
// @version 0.1 | ||
// @description https://github.com/TBD54566975/ssi-service | ||
// @contact.name TBD | ||
// @contact.url https://github.com/TBD54566975/ssi-service/issues | ||
// @contact.email [email protected] | ||
// @license.name Apache 2.0 | ||
// @license.url http://www.apache.org/licenses/LICENSE-2.0.html | ||
// @host localhost:8080 | ||
func main() { | ||
logrus.Info("Starting up...") | ||
|
||
|
Oops, something went wrong.