api

package
v0.0.33 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2022 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EngineStatus added in v0.0.10

func EngineStatus(c *gin.Context)

EngineStatus returns the status of the engine

func Fields added in v0.0.10

func Fields(c *gin.Context)

Fields Return the list of fields available for filtering the resources

func GetAssets

func GetAssets(prefix string) http.Handler

func GetHome

func GetHome(prefix string) http.Handler

GetHome renders the home page

func Healthz added in v0.0.10

func Healthz(c *gin.Context)

func Info added in v0.0.10

func Info(c *gin.Context)

Info renders the system information

func Refresh added in v0.0.10

func Refresh(c *gin.Context)

Refresh trigger the engine to fetch the resources

func Resource added in v0.0.10

func Resource(c *gin.Context)

Resource retrieves a resource by its id

func Resources added in v0.0.10

func Resources(c *gin.Context)

Resources retrieves the cloud resources matching the query parameters

func SetupRoutes

func SetupRoutes(router *gin.Engine, cfg config.Config, logger *zap.Logger, ds datastore.Datastore, engineF EngineFunc)

func StartWebServer added in v0.0.2

func StartWebServer(ctx context.Context, cfg config.Config, logger *zap.Logger, ds datastore.Datastore, engineF EngineFunc)

func Stats added in v0.0.3

func Stats(c *gin.Context)

Stats provides stats about stored data

Types

type EngineFunc added in v0.0.10

type EngineFunc func(context.Context) error

type Error

type Error struct {
	Message string `json:"error"`
}

func NewError

func NewError(err error) Error

Jump to

Keyboard shortcuts

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