ror-api

module
v0.0.0-...-b028101 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2024 License: Apache-2.0

README

ROR-API

Webapi made with Golang and Gin webapi framework

Prerequisites

Get started

Bash commands is from <repo root>/src/backend/ror-api/

Download dependencies:

go get ./...

Start webapi

go run main.go

Or Start the Debug ROR-Api debugger config from VS Code

Generate swagger docs:

Foreach endpoint function, you must add comments for it to show in generated openapi spec

ex:


// @Summary 	Create cluster
// @Schemes
// @Description Create a cluster
// @Tags 		cluster
// @Accept 		application/json
// @Produce 	application/json
// @Success 	200 {object} responses.ClusterResponse
// @Failure 	403  {string}  Forbidden
// @Failure 	401  {string}  Unauthorized
// @Failure 	500  {string}  Failure message
// @Router		/v1/cluster [post]
// @Security	ApiKey || AccessToken
func Create() gin.HandlerFunc {
	return func(c *gin.Context) {
		...
	}
}

Examples of annotations

To generate new swagger you need to install a cmd called swag (https://github.com/swaggo/swag):

go install github.com/swaggo/swag/cmd/swag@latest

(and remember to set <userprofile>\go\bin in PATH to terminal)

And run this command from ror-api root:

 swag init -g cmd/api/main.go --parseDependency --output cmd/api/docs

the folder docs and docs\swagger.json and docs\swagger.yaml is updated/created

Directories

Path Synopsis
cmd
api
internal
acl/repositories
TODO: This library is imported from ror, should determine if its a public library or not Package provides functions to do crud operations on acl as well as verification fo access
TODO: This library is imported from ror, should determine if its a public library or not Package provides functions to do crud operations on acl as well as verification fo access
acl/services
TODO: This library is imported from ror, should determine if its a public library or not
TODO: This library is imported from ror, should determine if its a public library or not
apiservices/clustersService
Package clustersservice cluster package provides services to get and manipulate the cluster object
Package clustersservice cluster package provides services to get and manipulate the cluster object
apiservices/resourcesService
the resource service package provides services to get and manipulate resources
the resource service package provides services to get and manipulate resources
auditlog
TODO: This library is imported from ror, should determine if its a public library or not
TODO: This library is imported from ror, should determine if its a public library or not
clients/helsegitlab
TODO: This library is imported from ror, should determine if its a public library or not
TODO: This library is imported from ror, should determine if its a public library or not
configuration
TODO: This library is imported from ror, should determine if its a public library or not the configuration package is responsible for loading and merging configurations it implements loaders and parsers
TODO: This library is imported from ror, should determine if its a public library or not the configuration package is responsible for loading and merging configurations it implements loaders and parsers
controllers/acl
The acl controller package provides controller functions for the /acl endpoints in the api V1.
The acl controller package provides controller functions for the /acl endpoints in the api V1.
controllers/auditlogs
TODO: Describe package
TODO: Describe package
controllers/clusters
The clusters controller package provides controller functions for the /cluster and /clusters endpoints in the api V1.
The clusters controller package provides controller functions for the /cluster and /clusters endpoints in the api V1.
controllers/datacenters
TODO: Describe package
TODO: Describe package
controllers/desired_version
TODO: Describe package
TODO: Describe package
controllers/health
TODO: Describe package
TODO: Describe package
TODO: Describe package
controllers/m2m/token
TODO: Describe package
TODO: Describe package
controllers/metrics
TODO: Describe package
TODO: Describe package
controllers/operatorconfigs
TODO: Describe package
TODO: Describe package
controllers/prices
TODO: Describe package
TODO: Describe package
controllers/resourcescontroller
resourcecontroller implements all controllers for resources
resourcecontroller implements all controllers for resources
controllers/v2/resourcescontroller
resourcecontroller implements all controllers for resources
resourcecontroller implements all controllers for resources
docs
Package docs Code generated by swaggo/swag.
Package docs Code generated by swaggo/swag.
factories/storagefactory
TODO: This library is imported from ror, should determine if its a public library or not
TODO: This library is imported from ror, should determine if its a public library or not
helpers/clusterHelper
TODO: This library is imported from ror, should determine if its a public library or not
TODO: This library is imported from ror, should determine if its a public library or not
helpers/mapping
TODO: This library is imported from ror, should determine if its a public library or not
TODO: This library is imported from ror, should determine if its a public library or not
helpers/mongoHelper
TODO: This library is imported from ror, should determine if its a public library or not
TODO: This library is imported from ror, should determine if its a public library or not
mocks/identitymocks
TODO: This library is imported from ror, should determine if its a public library or not
TODO: This library is imported from ror, should determine if its a public library or not
models
TODO: This library is imported from ror, should determine if its a public library or not
TODO: This library is imported from ror, should determine if its a public library or not
models/ldapmodels
TODO: This library is imported from ror, should determine if its a public library or not
TODO: This library is imported from ror, should determine if its a public library or not
models/m2mmodels
TODO: This library is imported from ror, should determine if its a public library or not
TODO: This library is imported from ror, should determine if its a public library or not
models/operatormodels
TODO: This library is imported from ror, should determine if its a public library or not
TODO: This library is imported from ror, should determine if its a public library or not
models/rorResources
TODO: This library is imported from ror, should determine if its a public library or not
TODO: This library is imported from ror, should determine if its a public library or not
models/vaultmodels
TODO: This library is imported from ror, should determine if its a public library or not
TODO: This library is imported from ror, should determine if its a public library or not
models/viewsmodels
TODO: This library is imported from ror, should determine if its a public library or not this package provides models for views
TODO: This library is imported from ror, should determine if its a public library or not this package provides models for views
mongodbrepo/mongoTypes
TODO: This library is imported from ror, should determine if its a public library or not
TODO: This library is imported from ror, should determine if its a public library or not
mongodbrepo/repositories/apikeysRepo
TODO: This library is imported from ror, should determine if its a public library or not
TODO: This library is imported from ror, should determine if its a public library or not
mongodbrepo/repositories/auditlogRepo
TODO: This library is imported from ror, should determine if its a public library or not
TODO: This library is imported from ror, should determine if its a public library or not
mongodbrepo/repositories/clustersRepo
TODO: This library is imported from ror, should determine if its a public library or not
TODO: This library is imported from ror, should determine if its a public library or not
mongodbrepo/repositories/datacentersRepo
TODO: This library is imported from ror, should determine if its a public library or not
TODO: This library is imported from ror, should determine if its a public library or not
mongodbrepo/repositories/desiredversionRepo
TODO: This library is imported from ror, should determine if its a public library or not
TODO: This library is imported from ror, should determine if its a public library or not
mongodbrepo/repositories/metricsRepo
TODO: This library is imported from ror, should determine if its a public library or not
TODO: This library is imported from ror, should determine if its a public library or not
mongodbrepo/repositories/operatorconfigRepo
TODO: This library is imported from ror, should determine if its a public library or not
TODO: This library is imported from ror, should determine if its a public library or not
mongodbrepo/repositories/pricesRepo
TODO: This library is imported from ror, should determine if its a public library or not
TODO: This library is imported from ror, should determine if its a public library or not
mongodbrepo/repositories/projectsRepo
TODO: This library is imported from ror, should determine if its a public library or not
TODO: This library is imported from ror, should determine if its a public library or not
mongodbrepo/repositories/resourcesmongodbrepo
TODO: This library is imported from ror, should determine if its a public library or not
TODO: This library is imported from ror, should determine if its a public library or not
mongodbrepo/repositories/rulesetsRepo
TODO: This library is imported from ror, should determine if its a public library or not
TODO: This library is imported from ror, should determine if its a public library or not
mongodbrepo/repositories/tasksRepo
TODO: This library is imported from ror, should determine if its a public library or not
TODO: This library is imported from ror, should determine if its a public library or not
mongodbrepo/repositories/viewsRepo
TODO: This library is imported from ror, should determine if its a public library or not package implements repofunctions to get resources for views
TODO: This library is imported from ror, should determine if its a public library or not package implements repofunctions to get resources for views
mongodbrepo/repositories/workspacesRepo
TODO: This library is imported from ror, should determine if its a public library or not
TODO: This library is imported from ror, should determine if its a public library or not
provider/clusterorder
The package clusterorder provides the interface and the factory method to create a new clusterorder based on the provider TODO: This might be a implementation in the upcoming ResourceFramework
The package clusterorder provides the interface and the factory method to create a new clusterorder based on the provider TODO: This might be a implementation in the upcoming ResourceFramework
provider/clusterorder/kindclusterorder
TODO: This library is imported from ror, should determine if its a public library or not
TODO: This library is imported from ror, should determine if its a public library or not
provider/clusterorder/talosclusterorder
TODO: This library is imported from ror, should determine if its a public library or not
TODO: This library is imported from ror, should determine if its a public library or not
provider/clusterorder/tanzuclusterorder
TODO: This library is imported from ror, should determine if its a public library or not
TODO: This library is imported from ror, should determine if its a public library or not
provider/clusterorder/utils
TODO: This library is imported from ror, should determine if its a public library or not
TODO: This library is imported from ror, should determine if its a public library or not
services/clusterservice
TODO: This library is imported from ror, should determine if its a public library or not
TODO: This library is imported from ror, should determine if its a public library or not
services/kubeconfigservice
TODO: This library is imported from ror, should determine if its a public library or not
TODO: This library is imported from ror, should determine if its a public library or not

Jump to

Keyboard shortcuts

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