Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Context ¶
type Context struct {
// Name is the name of the context
Name string `json:"name"`
// Server is the endpoint of the kube apiserver for a cluster
Server string `json:"server"`
// Cluster is the name of the cluster
Cluster string `json:"cluster"`
// User is the name of the user for a cluster
User string `json:"user"`
// Selected determines if the context has been selected for use in the
// dashboard
Selected bool `json:"selected"`
}
Context represents the configuration for a single cluster-user pair
type Session ¶
type Session struct {
gorm.Model
// Session ID
Key string `gorm:"unique"`
// encrypted cookie
Data []byte
// Time the session will expire
ExpiresAt time.Time
}
Session type that extends gorm.Model.
type User ¶
type User struct {
gorm.Model
Email string `json:"email" gorm:"unique"`
Password string `json:"password"`
Contexts string `json:"contexts"`
RawKubeConfig []byte `json:"rawKubeConfig"`
}
User type that extends gorm.Model
func (*User) ContextToSlice ¶
ContextToSlice converts the serialized context string to an array of strings
func (*User) Externalize ¶
func (u *User) Externalize() *UserExternal
Externalize generates an external User to be shared over REST
Click to show internal directories.
Click to hide internal directories.