interfaces

package
v0.0.0-...-f761163 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CollectionType             = "collection"
	UserPreferenceResourceType = "userpreference"
	SettingsResourceType       = "management.cattle.io.setting"
	ClusterResourceType        = "management.cattle.io.cluster"
	AuthProviderResourceType   = "authProvider"
	UserResourceType           = "user"
	PrincipalResourceType      = "principal"
	SchemaType                 = "schema"
)

Variables

This section is empty.

Functions

func GetBaseURL

func GetBaseURL(ec echo.Context) string
func GetSelfLink(ec echo.Context, additionalPaths ...string) string

Types

type APIData

type APIData struct {
	APIVersion string            `json:"apiVersion"`
	Kind       string            `json:"kind"`
	Type       string            `json:"type"`
	ID         string            `json:"id"`
	Links      map[string]string `json:"links"`
	Metadata   Metadata          `json:"metadata,omitempty"`
}

type AuthProvider

type AuthProvider struct {
	ID          string            `json:"id"`
	Type        string            `json:"type"`
	Actions     map[string]string `json:"actions"`
	Links       map[string]string `json:"links"`
	BaseType    string            `json:"baseType"`
	RedirectUrl string            `json:"redirectUrl"`
}

type Cluster

type Cluster struct {
	APIData
	Actions map[string]string      `json:"actions"`
	Spec    map[string]interface{} `json:"spec"`
	Status  map[string]interface{} `json:"status"`
}

type Collection

type Collection struct {
	Type         string            `json:"type"`
	Data         []interface{}     `json:"data"`
	ResourceType string            `json:"resourceType"`
	Actions      map[string]string `json:"actions"`
	Links        map[string]string `json:"links"`
	Revision     string            `json:"revision,omitempty"`
}

func NewCollection

func NewCollection(typ string) *Collection

type Error

type Error struct {
	Message string `json:"message"`
	Status  string `json:"status"`
	Type    string `json:"type"`
}

type Metadata

type Metadata struct {
	Name string `json:"name"`
}

type Principal

type Principal struct {
	Name          string            `json:"name"`
	ID            string            `json:"id"`
	LoginName     string            `json:"loginName"`
	BaseType      string            `json:"baseType"`
	Type          string            `json:"type"`
	Data          []interface{}     `json:"data"`
	Actions       map[string]string `json:"actions"`
	Links         map[string]string `json:"links"`
	MemberOf      bool              `json:"mustChangePassword"`
	Me            bool              `json:"me"`
	Provider      string            `json:"provider"`
	PrincipalType string            `json:"principalType"`
}

type Schema

type Schema struct {
	ID                string                 `json:"id"`
	Type              string                 `json:"type"`
	Links             map[string]string      `json:"links"`
	PluralName        string                 `json:"pluralName"`
	ResourceMethods   []string               `json:"resourceMethods"`
	ResourceFields    map[string]interface{} `json:"resourceFields"`
	CollectionMethods []string               `json:"collectionMethods"`
	Attributes        map[string]interface{} `json:"attributes"`
}

type Setting

type Setting struct {
	APIData
	Default    string `json:"default"`
	Value      string `json:"value"`
	Source     string `json:"source"`
	Customized bool   `json:"customized"`
}

type User

type User struct {
	Name               string            `json:"name"`
	ID                 string            `json:"id"`
	Username           string            `json:"username"`
	Description        string            `json:"description"`
	UUID               string            `json:"uuid"`
	BaseType           string            `json:"baseType"`
	Type               string            `json:"type"`
	Actions            map[string]string `json:"actions"`
	Links              map[string]string `json:"links"`
	State              string            `json:"state"`
	MustChangePassword bool              `json:"mustChangePassword"`
	Me                 bool              `json:"me"`
	Enabled            bool              `json:"enabled"`
	PrinicpalIDs       []string          `json:"principalIds"`
}

type UserPref

type UserPref struct {
	Type  string            `json:"type"`
	Data  interface{}       `json:"data"`
	ID    string            `json:"id"`
	Links map[string]string `json:"links"`
}

Jump to

Keyboard shortcuts

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