api

package
v0.0.20 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 23, 2025 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HeaderRequestID     = "X-Request-ID"
	HeaderApiVer        = "X-Api-Version"
	HeaderSrvName       = "X-Service"
	HeaderUserRoles     = "X-User-Roles"
	HeaderAuthorization = "Authorization"
	UserIdKey           = "UserId"
)
View Source
const (
	HealthCheckPath = "/health-check"
)

Variables

This section is empty.

Functions

func AuthMiddleware added in v0.0.19

func AuthMiddleware() gin.HandlerFunc

func GetStatusCode

func GetStatusCode(err error) int

func New

func New(srv Repo, staticHeader map[string]string, urlPrefix string) (*gin.Engine, error)

New godoc @title Analytics-Flow-Repo-V2 API @version 0.0.19 @description For the administration of analytics flows. @license.name Apache-2.0 @license.url http://www.apache.org/licenses/LICENSE-2.0.html @BasePath /

Types

type Repo

type Repo interface {
	SrvInfo(ctx context.Context) srv_info_hdl.ServiceInfo
	HealthCheck(ctx context.Context) error
	CreateFlow(flow models.Flow, userId string, authString string) (err error)
	UpdateFlow(id string, flow models.Flow, userId string, authString string) (err error)
	DeleteFlow(id string, userId string, auth string) (err error)
	GetFlows(userId string, args map[string][]string, auth string) (response models.FlowsResponse, err error)
	GetFlow(flowId string, userId string, auth string) (response models.Flow, err error)
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL