Skip to content
Snippets Groups Projects
Commit a4e1de23 authored by Yordan Kinkov's avatar Yordan Kinkov
Browse files

Perform trademark cleanup on the repository

parent 4b7ab41a
No related branches found
No related tags found
No related merge requests found
Showing
with 85 additions and 103 deletions
GAIA-X "Information Hub Service"
XFSC "Information Hub Service"
is responsible for exporting and importing policy data wrapped in
Verifiable Credentials and Verifiable Presentations.
......
[![pipeline status](https://gitlab.com/gaia-x/data-infrastructure-federation-services/tsa/infohub/badges/main/pipeline.svg)](https://gitlab.com/gaia-x/data-infrastructure-federation-services/tsa/infohub/-/commits/main)
[![coverage report](https://gitlab.com/gaia-x/data-infrastructure-federation-services/tsa/infohub/badges/main/coverage.svg)](https://gitlab.com/gaia-x/data-infrastructure-federation-services/tsa/infohub/-/commits/main)
[![pipeline status](https://gitlab.eclipse.org/eclipse/xfsc/tsa/infohub/badges/main/pipeline.svg)](https://gitlab.eclipse.org/eclipse/xfsc/tsa/infohub/-/commits/main)
[![coverage report](https://gitlab.eclipse.org/eclipse/xfsc/tsa/infohub/badges/main/coverage.svg)](https://gitlab.eclipse.org/eclipse/xfsc/tsa/infohub/-/commits/main)
# Information Hub
......
......@@ -21,24 +21,24 @@ import (
"golang.org/x/oauth2/clientcredentials"
"golang.org/x/sync/errgroup"
"gitlab.com/gaia-x/data-infrastructure-federation-services/tsa/golib/auth"
"gitlab.com/gaia-x/data-infrastructure-federation-services/tsa/golib/cache"
"gitlab.com/gaia-x/data-infrastructure-federation-services/tsa/golib/goadec"
"gitlab.com/gaia-x/data-infrastructure-federation-services/tsa/golib/graceful"
goahealth "gitlab.com/gaia-x/data-infrastructure-federation-services/tsa/infohub/gen/health"
goahealthsrv "gitlab.com/gaia-x/data-infrastructure-federation-services/tsa/infohub/gen/http/health/server"
goainfohubsrv "gitlab.com/gaia-x/data-infrastructure-federation-services/tsa/infohub/gen/http/infohub/server"
goaopenapisrv "gitlab.com/gaia-x/data-infrastructure-federation-services/tsa/infohub/gen/http/openapi/server"
goainfohub "gitlab.com/gaia-x/data-infrastructure-federation-services/tsa/infohub/gen/infohub"
"gitlab.com/gaia-x/data-infrastructure-federation-services/tsa/infohub/gen/openapi"
"gitlab.com/gaia-x/data-infrastructure-federation-services/tsa/infohub/internal/clients/policy"
"gitlab.com/gaia-x/data-infrastructure-federation-services/tsa/infohub/internal/clients/signer"
"gitlab.com/gaia-x/data-infrastructure-federation-services/tsa/infohub/internal/config"
"gitlab.com/gaia-x/data-infrastructure-federation-services/tsa/infohub/internal/credential"
"gitlab.com/gaia-x/data-infrastructure-federation-services/tsa/infohub/internal/service"
"gitlab.com/gaia-x/data-infrastructure-federation-services/tsa/infohub/internal/service/health"
"gitlab.com/gaia-x/data-infrastructure-federation-services/tsa/infohub/internal/service/infohub"
"gitlab.com/gaia-x/data-infrastructure-federation-services/tsa/infohub/internal/storage"
"gitlab.eclipse.org/eclipse/xfsc/tsa/golib/auth"
"gitlab.eclipse.org/eclipse/xfsc/tsa/golib/cache"
"gitlab.eclipse.org/eclipse/xfsc/tsa/golib/goadec"
"gitlab.eclipse.org/eclipse/xfsc/tsa/golib/graceful"
goahealth "gitlab.eclipse.org/eclipse/xfsc/tsa/infohub/gen/health"
goahealthsrv "gitlab.eclipse.org/eclipse/xfsc/tsa/infohub/gen/http/health/server"
goainfohubsrv "gitlab.eclipse.org/eclipse/xfsc/tsa/infohub/gen/http/infohub/server"
goaopenapisrv "gitlab.eclipse.org/eclipse/xfsc/tsa/infohub/gen/http/openapi/server"
goainfohub "gitlab.eclipse.org/eclipse/xfsc/tsa/infohub/gen/infohub"
"gitlab.eclipse.org/eclipse/xfsc/tsa/infohub/gen/openapi"
"gitlab.eclipse.org/eclipse/xfsc/tsa/infohub/internal/clients/policy"
"gitlab.eclipse.org/eclipse/xfsc/tsa/infohub/internal/clients/signer"
"gitlab.eclipse.org/eclipse/xfsc/tsa/infohub/internal/config"
"gitlab.eclipse.org/eclipse/xfsc/tsa/infohub/internal/credential"
"gitlab.eclipse.org/eclipse/xfsc/tsa/infohub/internal/service"
"gitlab.eclipse.org/eclipse/xfsc/tsa/infohub/internal/service/health"
"gitlab.eclipse.org/eclipse/xfsc/tsa/infohub/internal/service/infohub"
"gitlab.eclipse.org/eclipse/xfsc/tsa/infohub/internal/storage"
)
var Version = "0.0.0+development"
......@@ -219,8 +219,8 @@ func createLogger(logLevel string, opts ...zap.Option) (*zap.Logger, error) {
return config.Build(opts...)
}
func errFormatter(e error) goahttp.Statuser {
return service.NewErrorResponse(e)
func errFormatter(ctx context.Context, e error) goahttp.Statuser {
return service.NewErrorResponse(ctx, e)
}
func httpClient() *http.Client {
......
......@@ -2,7 +2,7 @@ FROM golang:1.20.5-alpine3.17 as builder
RUN apk add git
WORKDIR /go/src/gitlab.com/gaia-x/data-infrastructure-federation-services/tsa/infohub
WORKDIR /go/src/gitlab.eclipse.org/eclipse/xfsc/tsa/infohub
ADD . .
......
......@@ -4,12 +4,12 @@ ENV GO111MODULE=on
RUN go install github.com/canthefason/go-watcher/cmd/watcher@v0.2.4
ADD . /go/src/gitlab.com/gaia-x/data-infrastructure-federation-services/tsa/infohub
ADD . /go/src/gitlab.eclipse.org/eclipse/xfsc/tsa/infohub
WORKDIR /go/src/gitlab.com/gaia-x/data-infrastructure-federation-services/tsa/infohub
WORKDIR /go/src/gitlab.eclipse.org/eclipse/xfsc/tsa/infohub
RUN go install -mod=vendor ./cmd/infohub/...
EXPOSE 8080
ENTRYPOINT ["sh", "-c", "/go/bin/watcher -run gitlab.com/gaia-x/data-infrastructure-federation-services/tsa/infohub/cmd/infohub -watch gitlab.com/gaia-x/data-infrastructure-federation-services/tsa/infohub"]
ENTRYPOINT ["sh", "-c", "/go/bin/watcher -run gitlab.eclipse.org/eclipse/xfsc/tsa/infohub/cmd/infohub -watch gitlab.eclipse.org/eclipse/xfsc/tsa/infohub"]
// Code generated by goa v3.8.5, DO NOT EDIT.
// Code generated by goa v3.12.1, DO NOT EDIT.
//
// health client
//
// Command:
// $ goa gen
// gitlab.com/gaia-x/data-infrastructure-federation-services/tsa/infohub/design
// $ goa gen gitlab.eclipse.org/eclipse/xfsc/tsa/infohub/design
package health
......
// Code generated by goa v3.8.5, DO NOT EDIT.
// Code generated by goa v3.12.1, DO NOT EDIT.
//
// health endpoints
//
// Command:
// $ goa gen
// gitlab.com/gaia-x/data-infrastructure-federation-services/tsa/infohub/design
// $ goa gen gitlab.eclipse.org/eclipse/xfsc/tsa/infohub/design
package health
......@@ -37,7 +36,7 @@ func (e *Endpoints) Use(m func(goa.Endpoint) goa.Endpoint) {
// NewLivenessEndpoint returns an endpoint function that calls the method
// "Liveness" of service "health".
func NewLivenessEndpoint(s Service) goa.Endpoint {
return func(ctx context.Context, req interface{}) (interface{}, error) {
return func(ctx context.Context, req any) (any, error) {
return nil, s.Liveness(ctx)
}
}
......@@ -45,7 +44,7 @@ func NewLivenessEndpoint(s Service) goa.Endpoint {
// NewReadinessEndpoint returns an endpoint function that calls the method
// "Readiness" of service "health".
func NewReadinessEndpoint(s Service) goa.Endpoint {
return func(ctx context.Context, req interface{}) (interface{}, error) {
return func(ctx context.Context, req any) (any, error) {
return nil, s.Readiness(ctx)
}
}
// Code generated by goa v3.8.5, DO NOT EDIT.
// Code generated by goa v3.12.1, DO NOT EDIT.
//
// health service
//
// Command:
// $ goa gen
// gitlab.com/gaia-x/data-infrastructure-federation-services/tsa/infohub/design
// $ goa gen gitlab.eclipse.org/eclipse/xfsc/tsa/infohub/design
package health
......
// Code generated by goa v3.8.5, DO NOT EDIT.
// Code generated by goa v3.12.1, DO NOT EDIT.
//
// infohub HTTP client CLI support package
//
// Command:
// $ goa gen
// gitlab.com/gaia-x/data-infrastructure-federation-services/tsa/infohub/design
// $ goa gen gitlab.eclipse.org/eclipse/xfsc/tsa/infohub/design
package cli
......@@ -14,8 +13,8 @@ import (
"net/http"
"os"
healthc "gitlab.com/gaia-x/data-infrastructure-federation-services/tsa/infohub/gen/http/health/client"
infohubc "gitlab.com/gaia-x/data-infrastructure-federation-services/tsa/infohub/gen/http/infohub/client"
healthc "gitlab.eclipse.org/eclipse/xfsc/tsa/infohub/gen/http/health/client"
infohubc "gitlab.eclipse.org/eclipse/xfsc/tsa/infohub/gen/http/infohub/client"
goahttp "goa.design/goa/v3/http"
goa "goa.design/goa/v3/pkg"
)
......@@ -44,7 +43,7 @@ func ParseEndpoint(
enc func(*http.Request) goahttp.Encoder,
dec func(*http.Response) goahttp.Decoder,
restore bool,
) (goa.Endpoint, interface{}, error) {
) (goa.Endpoint, any, error) {
var (
healthFlags = flag.NewFlagSet("health", flag.ContinueOnError)
......@@ -136,7 +135,7 @@ func ParseEndpoint(
}
var (
data interface{}
data any
endpoint goa.Endpoint
err error
)
......
// Code generated by goa v3.8.5, DO NOT EDIT.
// Code generated by goa v3.12.1, DO NOT EDIT.
//
// health HTTP client CLI support package
//
// Command:
// $ goa gen
// gitlab.com/gaia-x/data-infrastructure-federation-services/tsa/infohub/design
// $ goa gen gitlab.eclipse.org/eclipse/xfsc/tsa/infohub/design
package client
// Code generated by goa v3.8.5, DO NOT EDIT.
// Code generated by goa v3.12.1, DO NOT EDIT.
//
// health client HTTP transport
//
// Command:
// $ goa gen
// gitlab.com/gaia-x/data-infrastructure-federation-services/tsa/infohub/design
// $ goa gen gitlab.eclipse.org/eclipse/xfsc/tsa/infohub/design
package client
......@@ -62,7 +61,7 @@ func (c *Client) Liveness() goa.Endpoint {
var (
decodeResponse = DecodeLivenessResponse(c.decoder, c.RestoreResponseBody)
)
return func(ctx context.Context, v interface{}) (interface{}, error) {
return func(ctx context.Context, v any) (any, error) {
req, err := c.BuildLivenessRequest(ctx, v)
if err != nil {
return nil, err
......@@ -81,7 +80,7 @@ func (c *Client) Readiness() goa.Endpoint {
var (
decodeResponse = DecodeReadinessResponse(c.decoder, c.RestoreResponseBody)
)
return func(ctx context.Context, v interface{}) (interface{}, error) {
return func(ctx context.Context, v any) (any, error) {
req, err := c.BuildReadinessRequest(ctx, v)
if err != nil {
return nil, err
......
// Code generated by goa v3.8.5, DO NOT EDIT.
// Code generated by goa v3.12.1, DO NOT EDIT.
//
// health HTTP client encoders and decoders
//
// Command:
// $ goa gen
// gitlab.com/gaia-x/data-infrastructure-federation-services/tsa/infohub/design
// $ goa gen gitlab.eclipse.org/eclipse/xfsc/tsa/infohub/design
package client
......@@ -20,7 +19,7 @@ import (
// BuildLivenessRequest instantiates a HTTP request object with method and path
// set to call the "health" service "Liveness" endpoint
func (c *Client) BuildLivenessRequest(ctx context.Context, v interface{}) (*http.Request, error) {
func (c *Client) BuildLivenessRequest(ctx context.Context, v any) (*http.Request, error) {
u := &url.URL{Scheme: c.scheme, Host: c.host, Path: LivenessHealthPath()}
req, err := http.NewRequest("GET", u.String(), nil)
if err != nil {
......@@ -36,8 +35,8 @@ func (c *Client) BuildLivenessRequest(ctx context.Context, v interface{}) (*http
// DecodeLivenessResponse returns a decoder for responses returned by the
// health Liveness endpoint. restoreBody controls whether the response body
// should be restored after having been read.
func DecodeLivenessResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (interface{}, error) {
return func(resp *http.Response) (interface{}, error) {
func DecodeLivenessResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (any, error) {
return func(resp *http.Response) (any, error) {
if restoreBody {
b, err := io.ReadAll(resp.Body)
if err != nil {
......@@ -62,7 +61,7 @@ func DecodeLivenessResponse(decoder func(*http.Response) goahttp.Decoder, restor
// BuildReadinessRequest instantiates a HTTP request object with method and
// path set to call the "health" service "Readiness" endpoint
func (c *Client) BuildReadinessRequest(ctx context.Context, v interface{}) (*http.Request, error) {
func (c *Client) BuildReadinessRequest(ctx context.Context, v any) (*http.Request, error) {
u := &url.URL{Scheme: c.scheme, Host: c.host, Path: ReadinessHealthPath()}
req, err := http.NewRequest("GET", u.String(), nil)
if err != nil {
......@@ -78,8 +77,8 @@ func (c *Client) BuildReadinessRequest(ctx context.Context, v interface{}) (*htt
// DecodeReadinessResponse returns a decoder for responses returned by the
// health Readiness endpoint. restoreBody controls whether the response body
// should be restored after having been read.
func DecodeReadinessResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (interface{}, error) {
return func(resp *http.Response) (interface{}, error) {
func DecodeReadinessResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (any, error) {
return func(resp *http.Response) (any, error) {
if restoreBody {
b, err := io.ReadAll(resp.Body)
if err != nil {
......
// Code generated by goa v3.8.5, DO NOT EDIT.
// Code generated by goa v3.12.1, DO NOT EDIT.
//
// HTTP request path constructors for the health service.
//
// Command:
// $ goa gen
// gitlab.com/gaia-x/data-infrastructure-federation-services/tsa/infohub/design
// $ goa gen gitlab.eclipse.org/eclipse/xfsc/tsa/infohub/design
package client
......
// Code generated by goa v3.8.5, DO NOT EDIT.
// Code generated by goa v3.12.1, DO NOT EDIT.
//
// health HTTP client types
//
// Command:
// $ goa gen
// gitlab.com/gaia-x/data-infrastructure-federation-services/tsa/infohub/design
// $ goa gen gitlab.eclipse.org/eclipse/xfsc/tsa/infohub/design
package client
// Code generated by goa v3.8.5, DO NOT EDIT.
// Code generated by goa v3.12.1, DO NOT EDIT.
//
// health HTTP server encoders and decoders
//
// Command:
// $ goa gen
// gitlab.com/gaia-x/data-infrastructure-federation-services/tsa/infohub/design
// $ goa gen gitlab.eclipse.org/eclipse/xfsc/tsa/infohub/design
package server
......@@ -17,8 +16,8 @@ import (
// EncodeLivenessResponse returns an encoder for responses returned by the
// health Liveness endpoint.
func EncodeLivenessResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, interface{}) error {
return func(ctx context.Context, w http.ResponseWriter, v interface{}) error {
func EncodeLivenessResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, any) error {
return func(ctx context.Context, w http.ResponseWriter, v any) error {
w.WriteHeader(http.StatusOK)
return nil
}
......@@ -26,8 +25,8 @@ func EncodeLivenessResponse(encoder func(context.Context, http.ResponseWriter) g
// EncodeReadinessResponse returns an encoder for responses returned by the
// health Readiness endpoint.
func EncodeReadinessResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, interface{}) error {
return func(ctx context.Context, w http.ResponseWriter, v interface{}) error {
func EncodeReadinessResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, any) error {
return func(ctx context.Context, w http.ResponseWriter, v any) error {
w.WriteHeader(http.StatusOK)
return nil
}
......
// Code generated by goa v3.8.5, DO NOT EDIT.
// Code generated by goa v3.12.1, DO NOT EDIT.
//
// HTTP request path constructors for the health service.
//
// Command:
// $ goa gen
// gitlab.com/gaia-x/data-infrastructure-federation-services/tsa/infohub/design
// $ goa gen gitlab.eclipse.org/eclipse/xfsc/tsa/infohub/design
package server
......
// Code generated by goa v3.8.5, DO NOT EDIT.
// Code generated by goa v3.12.1, DO NOT EDIT.
//
// health HTTP server
//
// Command:
// $ goa gen
// gitlab.com/gaia-x/data-infrastructure-federation-services/tsa/infohub/design
// $ goa gen gitlab.eclipse.org/eclipse/xfsc/tsa/infohub/design
package server
......@@ -12,7 +11,7 @@ import (
"context"
"net/http"
health "gitlab.com/gaia-x/data-infrastructure-federation-services/tsa/infohub/gen/health"
health "gitlab.eclipse.org/eclipse/xfsc/tsa/infohub/gen/health"
goahttp "goa.design/goa/v3/http"
goa "goa.design/goa/v3/pkg"
)
......@@ -24,12 +23,6 @@ type Server struct {
Readiness http.Handler
}
// ErrorNamer is an interface implemented by generated error structs that
// exposes the name of the error as defined in the design.
type ErrorNamer interface {
ErrorName() string
}
// MountPoint holds information about the mounted endpoints.
type MountPoint struct {
// Method is the name of the service method served by the mounted HTTP handler.
......@@ -53,7 +46,7 @@ func New(
decoder func(*http.Request) goahttp.Decoder,
encoder func(context.Context, http.ResponseWriter) goahttp.Encoder,
errhandler func(context.Context, http.ResponseWriter, error),
formatter func(err error) goahttp.Statuser,
formatter func(ctx context.Context, err error) goahttp.Statuser,
) *Server {
return &Server{
Mounts: []*MountPoint{
......@@ -74,6 +67,9 @@ func (s *Server) Use(m func(http.Handler) http.Handler) {
s.Readiness = m(s.Readiness)
}
// MethodNames returns the methods served.
func (s *Server) MethodNames() []string { return health.MethodNames[:] }
// Mount configures the mux to serve the health endpoints.
func Mount(mux goahttp.Muxer, h *Server) {
MountLivenessHandler(mux, h.Liveness)
......@@ -105,7 +101,7 @@ func NewLivenessHandler(
decoder func(*http.Request) goahttp.Decoder,
encoder func(context.Context, http.ResponseWriter) goahttp.Encoder,
errhandler func(context.Context, http.ResponseWriter, error),
formatter func(err error) goahttp.Statuser,
formatter func(ctx context.Context, err error) goahttp.Statuser,
) http.Handler {
var (
encodeResponse = EncodeLivenessResponse(encoder)
......@@ -149,7 +145,7 @@ func NewReadinessHandler(
decoder func(*http.Request) goahttp.Decoder,
encoder func(context.Context, http.ResponseWriter) goahttp.Encoder,
errhandler func(context.Context, http.ResponseWriter, error),
formatter func(err error) goahttp.Statuser,
formatter func(ctx context.Context, err error) goahttp.Statuser,
) http.Handler {
var (
encodeResponse = EncodeReadinessResponse(encoder)
......
// Code generated by goa v3.8.5, DO NOT EDIT.
// Code generated by goa v3.12.1, DO NOT EDIT.
//
// health HTTP server types
//
// Command:
// $ goa gen
// gitlab.com/gaia-x/data-infrastructure-federation-services/tsa/infohub/design
// $ goa gen gitlab.eclipse.org/eclipse/xfsc/tsa/infohub/design
package server
// Code generated by goa v3.8.5, DO NOT EDIT.
// Code generated by goa v3.12.1, DO NOT EDIT.
//
// infohub HTTP client CLI support package
//
// Command:
// $ goa gen
// gitlab.com/gaia-x/data-infrastructure-federation-services/tsa/infohub/design
// $ goa gen gitlab.eclipse.org/eclipse/xfsc/tsa/infohub/design
package client
import (
infohub "gitlab.com/gaia-x/data-infrastructure-federation-services/tsa/infohub/gen/infohub"
infohub "gitlab.eclipse.org/eclipse/xfsc/tsa/infohub/gen/infohub"
)
// BuildExportPayload builds the payload for the infohub Export endpoint from
......
// Code generated by goa v3.8.5, DO NOT EDIT.
// Code generated by goa v3.12.1, DO NOT EDIT.
//
// infohub client HTTP transport
//
// Command:
// $ goa gen
// gitlab.com/gaia-x/data-infrastructure-federation-services/tsa/infohub/design
// $ goa gen gitlab.eclipse.org/eclipse/xfsc/tsa/infohub/design
package client
......@@ -60,7 +59,7 @@ func (c *Client) Export() goa.Endpoint {
var (
decodeResponse = DecodeExportResponse(c.decoder, c.RestoreResponseBody)
)
return func(ctx context.Context, v interface{}) (interface{}, error) {
return func(ctx context.Context, v any) (any, error) {
req, err := c.BuildExportRequest(ctx, v)
if err != nil {
return nil, err
......@@ -80,7 +79,7 @@ func (c *Client) Import() goa.Endpoint {
encodeRequest = EncodeImportRequest(c.encoder)
decodeResponse = DecodeImportResponse(c.decoder, c.RestoreResponseBody)
)
return func(ctx context.Context, v interface{}) (interface{}, error) {
return func(ctx context.Context, v any) (any, error) {
req, err := c.BuildImportRequest(ctx, v)
if err != nil {
return nil, err
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment