instance

package module
v0.0.0-...-71f04f1 Latest Latest
Warning

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

Go to latest
Published: May 24, 2022 License: GPL-3.0 Imports: 14 Imported by: 0

README

DHIS2 Instance Manager CLI

CLI for interacting with the DHIS2 Instance manager.

Usage

Limitations

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewStacks

func NewStacks(im *Manager) stacks

func NewUI

func NewUI(im *Manager, component tea.Model) tea.Model

Types

type Manager

type Manager struct {
	// contains filtered or unexported fields
}

func NewManager

func NewManager(URL, user, pw string, client *http.Client) *Manager

func (*Manager) Create

func (m *Manager) Create(name string, group, stack int) error

func (*Manager) Login

func (m *Manager) Login() error

func (*Manager) Stack

func (m *Manager) Stack(id int) (*Stack, error)

func (*Manager) StackDetails

func (m *Manager) StackDetails(ids ...int) ([]*Stack, error)

func (*Manager) Stacks

func (m *Manager) Stacks() ([]Stacks, error)

type OptionalParam

type OptionalParam struct {
	ID           int    `json:"ID"`
	Name         string `json:"Name"`
	DefaultValue string `json:"DefaultValue"`
}

type RequiredParam

type RequiredParam struct {
	ID   int    `json:"ID"`
	Name string `json:"Name"`
}

type Stack

type Stack struct {
	ID             int             `json:"ID"`
	Name           string          `json:"name"`
	OptionalParams []OptionalParam `json:"optionalParameters"`
	RequiredParams []RequiredParam `json:"requiredParameters"`
}

TODO Instances? and parameters

type Stacks

type Stacks struct {
	ID   int    `json:"ID"`
	Name string `json:"name"`
}

type UI

type UI struct {
	// contains filtered or unexported fields
}

func (UI) Init

func (ui UI) Init() tea.Cmd

func (UI) Update

func (ui UI) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (UI) View

func (ui UI) View() string

Directories

Path Synopsis
cmd
cli
mockup

Jump to

Keyboard shortcuts

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