educatesrestapi

package
v0.0.0-...-60784e1 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2026 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthDetails

type AuthDetails struct {
	AccessToken  string `json:"access_token"`
	ExpiresIn    int    `json:"expires_in"`
	TokenType    string `json:"token_type"`
	Scope        string `json:"scope"`
	RefreshToken string `json:"refresh_token"`
}

type EnvironmentDetails

type EnvironmentDetails struct {
	Name      string          `json:"name"`
	State     string          `json:"state"`
	Duration  int64           `json:"duration"`
	Capacity  int64           `json:"capacity"`
	Reserved  int64           `json:"reserved"`
	Allocated int64           `json:"allocated"`
	Available int64           `json:"available"`
	Workshop  WorkshopDetails `json:"workshop"`
}

type Parameter

type Parameter struct {
	Name  string `json:"name"`
	Value string `json:"value"`
}

type PortalDetails

type PortalDetails struct {
	Name string `json:"name"`
	// Labels     []string         `json:"labels"`
	UID        string         `json:"uid"`
	Generation int64          `json:"generation"`
	URL        string         `json:"url"`
	Sessions   SessionDetails `json:"sessions"`
}

type RequestWorkshopRequest

type RequestWorkshopRequest struct {
	Parameters []Parameter `json:"parameters"`
}

RequestWorkshop --------------------------------------------

type RequestWorkshopResponse

type RequestWorkshopResponse struct {
	Name        string `json:"name"`
	User        string `json:"user"`
	URL         string `json:"url"`
	Workshop    string `json:"workshop"`
	Environment string `json:"environment"`
	Namespace   string `json:"namespace"`
}

type SessionDetails

type SessionDetails struct {
	Maximum    int64 `json:"maximum"`
	Registered int64 `json:"registered"`
	Anonymous  int64 `json:"anonymous"`
	Allocated  int64 `json:"allocated"`
}

type WorkshopDetails

type WorkshopDetails struct {
	Name        string   `json:"name"`
	Title       string   `json:"title"`
	Description string   `json:"description"`
	Vendor      string   `json:"vendor"`
	Authors     []string `json:"authors"`
	Difficulty  string   `json:"difficulty"`
	Duration    string   `json:"duration"`
	Tags        []string `json:"tags"`
	// Labels      []string `json:"labels"`
	URL  string `json:"url"`
}

type WorkshopSessionDetails

type WorkshopSessionDetails struct {
	Started    string `json:"started"`
	Expires    string `json:"expires"`
	Expiring   bool   `json:"expiring"`
	Countdown  int    `json:"countdown"`
	Extendable bool   `json:"extendable"`
	Status     string `json:"status"`
}

type WorkshopsCatalogRequester

type WorkshopsCatalogRequester struct {
	PortalUrl string
	Auth      *AuthDetails
	// contains filtered or unexported fields
}

func NewWorkshopsCatalogRequester

func NewWorkshopsCatalogRequester(clusterConfig *cluster.ClusterConfig, portalName string) *WorkshopsCatalogRequester

func (*WorkshopsCatalogRequester) ExtendWorkshopSession

func (c *WorkshopsCatalogRequester) ExtendWorkshopSession(sessionName string) (*WorkshopSessionDetails, error)

func (*WorkshopsCatalogRequester) GetWorkshopSession

func (c *WorkshopsCatalogRequester) GetWorkshopSession(sessionName string) (*WorkshopSessionDetails, error)

func (*WorkshopsCatalogRequester) GetWorkshopsCatalog

func (c *WorkshopsCatalogRequester) GetWorkshopsCatalog() (*WorkshopsCatalogResponse, error)

func (*WorkshopsCatalogRequester) Login

func (c *WorkshopsCatalogRequester) Login() (func(), error)

func (*WorkshopsCatalogRequester) RequestWorkshop

func (c *WorkshopsCatalogRequester) RequestWorkshop(workshopName string, environmentName string, params map[string]string, indexUrl string, user string, timeout int) (*RequestWorkshopResponse, error)

func (*WorkshopsCatalogRequester) TerminateWorkshopSession

func (c *WorkshopsCatalogRequester) TerminateWorkshopSession(sessionName string) (*WorkshopSessionDetails, error)

type WorkshopsCatalogRequesterApi

type WorkshopsCatalogRequesterApi interface {
	GetWorkshopsCatalog() (*WorkshopsCatalogResponse, error)
	Login() (func(), error)
}

type WorkshopsCatalogResponse

type WorkshopsCatalogResponse struct {
	Portal       PortalDetails        `json:"portal"`
	Environments []EnvironmentDetails `json:"environments"`
}

Jump to

Keyboard shortcuts

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