cli

package
v0.14.4 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2026 License: GPL-3.0 Imports: 27 Imported by: 0

Documentation

Overview

Package cli implements the CLI of the CEEMS API server app

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CEEMSAPIAppConfig

type CEEMSAPIAppConfig struct {
	Server CEEMSAPIServerConfig `yaml:"ceems_api_server"`
}

CEEMSAPIAppConfig contains the configuration of CEEMS API server.

func (*CEEMSAPIAppConfig) SetDirectory

func (c *CEEMSAPIAppConfig) SetDirectory(dir string)

SetDirectory joins any relative file paths with dir.

func (*CEEMSAPIAppConfig) Validate

func (c *CEEMSAPIAppConfig) Validate() error

Validate validates the config.

type CEEMSAPIServerConfig

type CEEMSAPIServerConfig struct {
	Data  ceems_db.DataConfig  `yaml:"data"`
	Admin ceems_db.AdminConfig `yaml:"admin"`
	Web   ceems_http.WebConfig `yaml:"web"`
}

CEEMSAPIServerConfig contains the configuration of CEEMS API server.

type CEEMSServer

type CEEMSServer struct {
	App kingpin.Application
	// contains filtered or unexported fields
}

CEEMSServer represents the `ceems_server` cli.

func NewCEEMSServer

func NewCEEMSServer() (*CEEMSServer, error)

NewCEEMSServer creates a new CEEMSServer instance.

func (*CEEMSServer) Main

func (b *CEEMSServer) Main() error

Main is the entry point of the `ceems_server` command.

@title			CEEMS API
@version		1.0
@description	OpenAPI specification (OAS) for the CEEMS REST API.
@description
@description	See the Interactive Docs to try CEEMS API methods without writing code, and get
@description	the complete schema of resources exposed by the API.
@description
@description	If basic auth is enabled, all the endpoints require authentication.
@description
@description	All the endpoints, except `health`, `swagger`, `debug` and `demo`,
@description	must send a user-agent header.
@description
@description	A demo instance of CEEMS API server is provided for the users to test. This
@description	instance is running at `https://ceems-demo.myaddr.tools:6443` and it is the
@description	default server that will serve the requests originating from current OAS client.
@description
@description	Some of the valid users for this demo instance are:
@description	- arnold
@description	- betty
@description	- edna
@description	- gazoo
@description	- wilma
@description
@description	Every request must contain a `X-Grafana-User` header with one of the usernames
@description	above as the value to the header. This is how CEEMS API server recognise the user.
@description
@description	Some of the valid projects for this demo instance are:
@description	- bedrock
@description	- cornerstone
@description
@description	Demo instance have CORS enabled to allow cross-domain communication from the browser.
@description	All responses have a wildcard same-origin which makes them completely public and
@description	accessible to everyone, including any code on any site.
@description
@description	To test admin resources, users can use `admin` as `X-Grafana-User`.
@description
@description				Timestamps must be specified in milliseconds, unless otherwise specified.

@contact.name				Mahendra Paipuri
@contact.url				https://github.com/ceems-dev/ceems/issues
@contact.email				mahendra.paipuri@gmail.com

@license.name				GPL-3.0 license
@license.url				https://www.gnu.org/licenses/gpl-3.0.en.html

@securityDefinitions.basic	BasicAuth

@servers.url				https://ceems-demo.myaddr.tools:6443/api/v1
@servers.description		Test CEEMS API server URL.

@externalDocs.url			https://ceems-dev.github.io/ceems/

@x-logo						{"url": "https://raw.githubusercontent.com/ceems-dev/ceems/refs/heads/main/website/static/img/logo.png", "altText": "CEEMS logo"}

Jump to

Keyboard shortcuts

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