Documentation
¶
Index ¶
- Constants
- Variables
- func FilterDatasource[T DatasourceInterface](kind string, defaultDTS *bool, list []T) []T
- func GetStruct(kind Kind) (modelAPI.Entity, error)
- func IsBuiltinVariable(variableName string) bool
- func IsGlobal(kind Kind) bool
- type Dashboard
- type Datasource
- func (d *Datasource) GetDatasourceSpec() datasource.Spec
- func (d *Datasource) GetKind() string
- func (d *Datasource) GetMetadata() modelAPI.Metadata
- func (d *Datasource) GetSpec() any
- func (d *Datasource) UnmarshalJSON(data []byte) error
- func (d *Datasource) UnmarshalYAML(unmarshal func(any) error) error
- type DatasourceInterface
- type EphemeralDashboard
- type EphemeralDashboardSpec
- type EphemeralDashboardSpecBase
- type Folder
- type FolderDisplay
- type FolderItem
- type FolderSpec
- type GlobalDatasource
- func (d *GlobalDatasource) GetDatasourceSpec() datasource.Spec
- func (d *GlobalDatasource) GetKind() string
- func (d *GlobalDatasource) GetMetadata() modelAPI.Metadata
- func (d *GlobalDatasource) GetSpec() any
- func (d *GlobalDatasource) UnmarshalJSON(data []byte) error
- func (d *GlobalDatasource) UnmarshalYAML(unmarshal func(any) error) error
- type GlobalRole
- type GlobalRoleBinding
- func (g *GlobalRoleBinding) GetKind() string
- func (g *GlobalRoleBinding) GetMetadata() modelAPI.Metadata
- func (g *GlobalRoleBinding) GetRoleBindingSpec() RoleBindingSpec
- func (g *GlobalRoleBinding) GetSpec() any
- func (g *GlobalRoleBinding) UnmarshalJSON(data []byte) error
- func (g *GlobalRoleBinding) UnmarshalYAML(unmarshal func(any) error) error
- type GlobalSecret
- type GlobalVariable
- type Health
- type Kind
- type Metadata
- type ModuleSpec
- type NativeProvider
- type OAuthProvider
- type PartialEntity
- type PartialProjectEntity
- type PluginInDevelopment
- type PluginModule
- type Project
- type ProjectMetadata
- type ProjectMetadataWrapper
- type ProjectSpec
- type PublicGlobalSecret
- type PublicMetadata
- func (m *PublicMetadata) CreateNow()
- func (m *PublicMetadata) Flatten(sensitive bool)
- func (m *PublicMetadata) GetName() string
- func (m *PublicMetadata) UnmarshalJSON(data []byte) error
- func (m *PublicMetadata) UnmarshalYAML(unmarshal func(any) error) error
- func (m *PublicMetadata) Update(previous PublicMetadata)
- type PublicNativeProvider
- type PublicProjectMetadata
- type PublicSecret
- type PublicSecretSpec
- type PublicUser
- type PublicUserSpec
- type Role
- type RoleBinding
- type RoleBindingInterface
- type RoleBindingSpec
- type RoleInterface
- type RoleSpec
- type Secret
- type SecretSpec
- type Subject
- type User
- type UserSpec
- type Variable
- type VariableInterface
- type VariableSpec
- type View
Constants ¶
const PluginModuleKind = "PluginModule"
const WildcardProject = "*"
WildcardProject is a special project name that can be used to refer to all projects. It is used in the context of user permissions to indicate that the permission applies to all projects.
Variables ¶
var PluralKindMap = map[Kind]string{ KindDashboard: "dashboards", KindDatasource: "datasources", KindEphemeralDashboard: "ephemeraldashboards", KindFolder: "folders", KindGlobalDatasource: "globaldatasources", KindGlobalRole: "globalroles", KindGlobalRoleBinding: "globalrolebindings", KindGlobalSecret: "globalsecrets", KindGlobalVariable: "globalvariables", KindProject: "projects", KindRole: "roles", KindRoleBinding: "rolebindings", KindSecret: "secrets", KindUser: "users", KindVariable: "variables", }
Functions ¶
func FilterDatasource ¶
func FilterDatasource[T DatasourceInterface](kind string, defaultDTS *bool, list []T) []T
func GetStruct ¶
GetStruct return a pointer to an empty struct that matches the kind passed as a parameter.
func IsBuiltinVariable ¶
IsBuiltinVariable check if variable name is a builtin variable
Types ¶
type Dashboard ¶
type Dashboard struct {
Kind Kind `json:"kind" yaml:"kind"`
Metadata ProjectMetadata `json:"metadata" yaml:"metadata"`
Spec dashboardSpec.Spec `json:"spec" yaml:"spec"`
}
func (*Dashboard) GetMetadata ¶
func (*Dashboard) UnmarshalJSON ¶
type Datasource ¶
type Datasource struct {
Kind Kind `json:"kind" yaml:"kind"`
Metadata ProjectMetadata `json:"metadata" yaml:"metadata"`
Spec datasource.Spec `json:"spec" yaml:"spec"`
}
Datasource will be the datasource you can define in your project/namespace This is a resource that won't be shared across projects. A Dashboard can use it only if it is in the same project.
func (*Datasource) GetDatasourceSpec ¶
func (d *Datasource) GetDatasourceSpec() datasource.Spec
func (*Datasource) GetKind ¶
func (d *Datasource) GetKind() string
func (*Datasource) GetMetadata ¶
func (d *Datasource) GetMetadata() modelAPI.Metadata
func (*Datasource) GetSpec ¶
func (d *Datasource) GetSpec() any
func (*Datasource) UnmarshalJSON ¶
func (d *Datasource) UnmarshalJSON(data []byte) error
func (*Datasource) UnmarshalYAML ¶
func (d *Datasource) UnmarshalYAML(unmarshal func(any) error) error
type DatasourceInterface ¶
type DatasourceInterface interface {
GetMetadata() modelAPI.Metadata
GetDatasourceSpec() datasource.Spec
}
type EphemeralDashboard ¶
type EphemeralDashboard struct {
Kind Kind `json:"kind" yaml:"kind"`
Metadata ProjectMetadata `json:"metadata" yaml:"metadata"`
Spec EphemeralDashboardSpec `json:"spec" yaml:"spec"`
}
func (*EphemeralDashboard) GetKind ¶
func (e *EphemeralDashboard) GetKind() string
func (*EphemeralDashboard) GetMetadata ¶
func (e *EphemeralDashboard) GetMetadata() modelAPI.Metadata
func (*EphemeralDashboard) GetSpec ¶
func (e *EphemeralDashboard) GetSpec() any
func (*EphemeralDashboard) UnmarshalJSON ¶
func (e *EphemeralDashboard) UnmarshalJSON(data []byte) error
func (*EphemeralDashboard) UnmarshalYAML ¶
func (e *EphemeralDashboard) UnmarshalYAML(unmarshal func(any) error) error
type EphemeralDashboardSpec ¶
type EphemeralDashboardSpec struct {
EphemeralDashboardSpecBase `json:",inline" yaml:",inline"`
dashboard.Spec `json:",inline" yaml:",inline"`
}
func (*EphemeralDashboardSpec) UnmarshalJSON ¶
func (eds *EphemeralDashboardSpec) UnmarshalJSON(data []byte) error
func (*EphemeralDashboardSpec) UnmarshalYAML ¶
func (eds *EphemeralDashboardSpec) UnmarshalYAML(unmarshal func(any) error) error
type EphemeralDashboardSpecBase ¶
func (*EphemeralDashboardSpecBase) UnmarshalJSON ¶
func (edsb *EphemeralDashboardSpecBase) UnmarshalJSON(data []byte) error
func (*EphemeralDashboardSpecBase) UnmarshalYAML ¶
func (edsb *EphemeralDashboardSpecBase) UnmarshalYAML(unmarshal func(any) error) error
type Folder ¶
type Folder struct {
Kind Kind `json:"kind" yaml:"kind"`
Metadata ProjectMetadata `json:"metadata" yaml:"metadata"`
Spec FolderSpec `json:"spec" yaml:"spec"`
}
func (*Folder) GetMetadata ¶
func (*Folder) UnmarshalJSON ¶
type FolderDisplay ¶
type FolderDisplay struct {
Name string `json:"name,omitempty" yaml:"name,omitempty"`
}
type FolderItem ¶
type FolderItem struct {
// Kind can only have two values: `Dashboard` or `Folder`
Kind Kind `json:"kind" yaml:"kind"`
// Name is the reference to the dashboard when `Kind` is equal to `Dashboard`.
// When `Kind` is equal to `Folder`, then it's just the name of the folder.
Name string `json:"name" yaml:"name"`
Items []FolderItem `json:"items,omitempty" yaml:"items,omitempty"`
}
FolderItem is a single node in the folder tree. Kind is either "Dashboard" or "Folder". When Kind is "Folder", Items holds the nested children.
func (*FolderItem) UnmarshalJSON ¶
func (f *FolderItem) UnmarshalJSON(data []byte) error
func (*FolderItem) UnmarshalYAML ¶
func (f *FolderItem) UnmarshalYAML(unmarshal func(any) error) error
type FolderSpec ¶
type FolderSpec struct {
Display *FolderDisplay `json:"display,omitempty" yaml:"display,omitempty"`
Items []FolderItem `json:"items,omitempty" yaml:"items,omitempty"`
}
type GlobalDatasource ¶
type GlobalDatasource struct {
Kind Kind `json:"kind" yaml:"kind"`
Metadata Metadata `json:"metadata" yaml:"metadata"`
Spec datasource.Spec `json:"spec" yaml:"spec"`
}
GlobalDatasource is the struct representing the datasource shared to everybody. Any Dashboard can reference it.
func (*GlobalDatasource) GetDatasourceSpec ¶
func (d *GlobalDatasource) GetDatasourceSpec() datasource.Spec
func (*GlobalDatasource) GetKind ¶
func (d *GlobalDatasource) GetKind() string
func (*GlobalDatasource) GetMetadata ¶
func (d *GlobalDatasource) GetMetadata() modelAPI.Metadata
func (*GlobalDatasource) GetSpec ¶
func (d *GlobalDatasource) GetSpec() any
func (*GlobalDatasource) UnmarshalJSON ¶
func (d *GlobalDatasource) UnmarshalJSON(data []byte) error
func (*GlobalDatasource) UnmarshalYAML ¶
func (d *GlobalDatasource) UnmarshalYAML(unmarshal func(any) error) error
type GlobalRole ¶
type GlobalRole struct {
Kind Kind `json:"kind" yaml:"kind"`
Metadata Metadata `json:"metadata" yaml:"metadata"`
Spec RoleSpec `json:"spec" yaml:"spec"`
}
GlobalRole is the struct representing the role shared to everybody.
func (*GlobalRole) GetKind ¶
func (g *GlobalRole) GetKind() string
func (*GlobalRole) GetMetadata ¶
func (g *GlobalRole) GetMetadata() modelAPI.Metadata
func (*GlobalRole) GetRoleSpec ¶
func (g *GlobalRole) GetRoleSpec() RoleSpec
func (*GlobalRole) GetSpec ¶
func (g *GlobalRole) GetSpec() any
func (*GlobalRole) UnmarshalJSON ¶
func (g *GlobalRole) UnmarshalJSON(data []byte) error
func (*GlobalRole) UnmarshalYAML ¶
func (g *GlobalRole) UnmarshalYAML(unmarshal func(any) error) error
type GlobalRoleBinding ¶
type GlobalRoleBinding struct {
Kind Kind `json:"kind" yaml:"kind"`
Metadata Metadata `json:"metadata" yaml:"metadata"`
Spec RoleBindingSpec `json:"spec" yaml:"spec"`
}
GlobalRoleBinding is the struct representing the roleBinding shared to everybody.
func (*GlobalRoleBinding) GetKind ¶
func (g *GlobalRoleBinding) GetKind() string
func (*GlobalRoleBinding) GetMetadata ¶
func (g *GlobalRoleBinding) GetMetadata() modelAPI.Metadata
func (*GlobalRoleBinding) GetRoleBindingSpec ¶
func (g *GlobalRoleBinding) GetRoleBindingSpec() RoleBindingSpec
func (*GlobalRoleBinding) GetSpec ¶
func (g *GlobalRoleBinding) GetSpec() any
func (*GlobalRoleBinding) UnmarshalJSON ¶
func (g *GlobalRoleBinding) UnmarshalJSON(data []byte) error
func (*GlobalRoleBinding) UnmarshalYAML ¶
func (g *GlobalRoleBinding) UnmarshalYAML(unmarshal func(any) error) error
type GlobalSecret ¶
type GlobalSecret struct {
Kind Kind `json:"kind" yaml:"kind"`
Metadata Metadata `json:"metadata" yaml:"metadata"`
Spec SecretSpec `json:"spec" yaml:"spec"`
}
func (*GlobalSecret) GetKind ¶
func (g *GlobalSecret) GetKind() string
func (*GlobalSecret) GetMetadata ¶
func (g *GlobalSecret) GetMetadata() modelAPI.Metadata
func (*GlobalSecret) GetSpec ¶
func (g *GlobalSecret) GetSpec() any
type GlobalVariable ¶
type GlobalVariable struct {
Kind Kind `json:"kind" yaml:"kind"`
Metadata Metadata `json:"metadata" yaml:"metadata"`
Spec VariableSpec `json:"spec" yaml:"spec"`
}
GlobalVariable is a global variable that be used everywhere regardless the project.
func (*GlobalVariable) GetKind ¶
func (v *GlobalVariable) GetKind() string
func (*GlobalVariable) GetMetadata ¶
func (v *GlobalVariable) GetMetadata() modelAPI.Metadata
func (*GlobalVariable) GetSpec ¶
func (v *GlobalVariable) GetSpec() any
func (*GlobalVariable) GetVarSpec ¶
func (v *GlobalVariable) GetVarSpec() VariableSpec
type Health ¶
type Health struct {
BuildTime string `json:"buildTime"`
Version string `json:"version"`
Commit string `json:"commit"`
Database bool `json:"database"`
}
Health is the struct that provides the health information of the API
type Kind ¶
type Kind string
const ( KindDashboard Kind = "Dashboard" KindDatasource Kind = "Datasource" KindEphemeralDashboard Kind = "EphemeralDashboard" KindFolder Kind = "Folder" KindGlobalDatasource Kind = "GlobalDatasource" KindGlobalRole Kind = "GlobalRole" KindGlobalRoleBinding Kind = "GlobalRoleBinding" KindGlobalVariable Kind = "GlobalVariable" KindGlobalSecret Kind = "GlobalSecret" KindProject Kind = "Project" KindRole Kind = "Role" KindRoleBinding Kind = "RoleBinding" KindSecret Kind = "Secret" KindUser Kind = "User" KindVariable Kind = "Variable" )
func (*Kind) UnmarshalJSON ¶
type Metadata ¶
type Metadata struct {
Name string `json:"name" yaml:"name"`
// +kubebuilder:validation:Schemaless
// +kubebuilder:validation:Type=string
// +kubebuilder:validation:Format=date-time
// +kubebuilder:validation:Optional
CreatedAt time.Time `json:"createdAt" yaml:"createdAt"`
// +kubebuilder:validation:Schemaless
// +kubebuilder:validation:Type=string
// +kubebuilder:validation:Format=date-time
// +kubebuilder:validation:Optional
UpdatedAt time.Time `json:"updatedAt" yaml:"updatedAt"`
Version uint64 `json:"version" yaml:"version"`
// +kubebuilder:validation:Optional
// +kubebuilder:validation:MaxItems=20
Tags set.Set[string] `json:"tags,omitempty" yaml:"tags,omitempty"`
}
func NewMetadata ¶
func (*Metadata) UnmarshalJSON ¶
type ModuleSpec ¶
type ModuleSpec struct {
SchemasPath string `json:"schemasPath" yaml:"schemasPath"`
Plugins []module.Plugin `json:"plugins" yaml:"plugins"`
}
func NewModuleSpec ¶
func NewModuleSpec(module module.Module) *ModuleSpec
type NativeProvider ¶
type NativeProvider struct {
Password string `json:"password,omitempty" yaml:"password,omitempty"`
// PasswordHash accepts a pre-computed bcrypt hash instead of a plaintext password.
// When set, the hash is stored directly without re-hashing.
// This is useful for provisioning users from configuration files without exposing
// cleartext passwords (e.g. in Kubernetes ConfigMaps).
// Mutually exclusive with Password.
PasswordHash string `json:"passwordHash,omitempty" yaml:"passwordHash,omitempty"`
}
type OAuthProvider ¶
type PartialEntity ¶
type PartialEntity struct {
Kind Kind `json:"kind" yaml:"kind"`
Metadata Metadata `json:"metadata" yaml:"metadata"`
Spec struct{} `json:"spec,omitempty" yaml:"spec,omitempty"`
}
func (*PartialEntity) GetKind ¶
func (p *PartialEntity) GetKind() string
func (*PartialEntity) GetMetadata ¶
func (p *PartialEntity) GetMetadata() modelAPI.Metadata
func (*PartialEntity) GetSpec ¶
func (p *PartialEntity) GetSpec() any
type PartialProjectEntity ¶
type PartialProjectEntity struct {
Kind Kind `json:"kind" yaml:"kind"`
Metadata ProjectMetadata `json:"metadata" yaml:"metadata"`
Spec struct{} `json:"spec,omitempty" yaml:"spec,omitempty"`
}
func (*PartialProjectEntity) GetKind ¶
func (p *PartialProjectEntity) GetKind() string
func (*PartialProjectEntity) GetMetadata ¶
func (p *PartialProjectEntity) GetMetadata() modelAPI.Metadata
func (*PartialProjectEntity) GetSpec ¶
func (p *PartialProjectEntity) GetSpec() any
type PluginInDevelopment ¶
type PluginInDevelopment struct {
// The name of the plugin in development
Name string `json:"name" yaml:"name"`
// The version of the plugin in development
Version string `json:"version" yaml:"version"`
// The registry of the plugin in development. It can be empty.
Registry string `json:"registry,omitempty" yaml:"registry,omitempty"`
// DisableSchema is used to disable the schema validation of the plugin.
// It is useful when the plugin is in development and the schema is not yet defined.
DisableSchema bool `json:"disable_schema,omitempty" yaml:"disable_schema,omitempty"`
// The URL of the development server hosting the plugin.
// It is usually created by the command `rsbuild dev`.
// If defined, it will override the URL defined in the `PluginDevEnvironment`.
URL *common.URL `json:"url,omitempty" yaml:"url,omitempty"`
// The absolute path to the plugin repository
AbsolutePath string `json:"absolute_path" yaml:"absolute_path"`
}
func (*PluginInDevelopment) UnmarshalJSON ¶
func (p *PluginInDevelopment) UnmarshalJSON(data []byte) error
func (*PluginInDevelopment) UnmarshalYAML ¶
func (p *PluginInDevelopment) UnmarshalYAML(unmarshal func(any) error) error
type PluginModule ¶
type Project ¶
type Project struct {
Kind Kind `json:"kind" yaml:"kind"`
Metadata Metadata `json:"metadata" yaml:"metadata"`
Spec ProjectSpec `json:"spec,omitempty" yaml:"spec,omitempty"`
}
func (*Project) GetMetadata ¶
func (*Project) UnmarshalJSON ¶
type ProjectMetadata ¶
type ProjectMetadata struct {
Metadata `json:",inline" yaml:",inline"`
ProjectMetadataWrapper `json:",inline" yaml:",inline"`
}
ProjectMetadata is the metadata struct for resources that belongs to a project.
func NewProjectMetadata ¶
func NewProjectMetadata(project string, name string) *ProjectMetadata
func (*ProjectMetadata) Flatten ¶
func (pm *ProjectMetadata) Flatten(sensitive bool)
func (*ProjectMetadata) GetName ¶
func (pm *ProjectMetadata) GetName() string
func (*ProjectMetadata) UnmarshalJSON ¶
func (pm *ProjectMetadata) UnmarshalJSON(data []byte) error
This method is needed in the case of JSON otherwise parts of the fields are missed when unmarshalling
func (*ProjectMetadata) UnmarshalYAML ¶
func (pm *ProjectMetadata) UnmarshalYAML(unmarshal func(any) error) error
This method is needed in the case of YAML otherwise the validation part is not triggered when unmarshalling
func (*ProjectMetadata) Update ¶
func (pm *ProjectMetadata) Update(previous ProjectMetadata)
type ProjectMetadataWrapper ¶
type ProjectMetadataWrapper struct {
Project string `json:"project" yaml:"project"`
}
ProjectMetadataWrapper is a wrapping struct that is required to allow defining a custom unmarshall on Metadata without breaking the Project attribute (the fact Metadata is injected line in ProjectMetadata caused Project string to be ignored when unmarshalling)
func (*ProjectMetadataWrapper) UnmarshalJSON ¶
func (p *ProjectMetadataWrapper) UnmarshalJSON(data []byte) error
func (*ProjectMetadataWrapper) UnmarshalYAML ¶
func (p *ProjectMetadataWrapper) UnmarshalYAML(unmarshal func(any) error) error
type ProjectSpec ¶
type PublicGlobalSecret ¶
type PublicGlobalSecret struct {
Kind Kind `json:"kind" yaml:"kind"`
Metadata PublicMetadata `json:"metadata" yaml:"metadata"`
Spec PublicSecretSpec `json:"spec" yaml:"spec"`
}
func NewPublicGlobalSecret ¶
func NewPublicGlobalSecret(s *GlobalSecret) *PublicGlobalSecret
func (*PublicGlobalSecret) GetKind ¶
func (g *PublicGlobalSecret) GetKind() string
func (*PublicGlobalSecret) GetMetadata ¶
func (g *PublicGlobalSecret) GetMetadata() modelAPI.Metadata
func (*PublicGlobalSecret) GetSpec ¶
func (g *PublicGlobalSecret) GetSpec() any
type PublicMetadata ¶
type PublicMetadata struct {
Name string `json:"name" yaml:"name"`
// +kubebuilder:validation:Schemaless
// +kubebuilder:validation:Type=string
// +kubebuilder:validation:Format=date-time
// +kubebuilder:validation:Optional
CreatedAt time.Time `json:"createdAt" yaml:"createdAt"`
// +kubebuilder:validation:Schemaless
// +kubebuilder:validation:Type=string
// +kubebuilder:validation:Format=date-time
// +kubebuilder:validation:Optional
UpdatedAt time.Time `json:"updatedAt" yaml:"updatedAt"`
Version uint64 `json:"version" yaml:"version"`
Tags set.Set[string] `json:"tags,omitempty" yaml:"tags,omitempty"`
}
PublicMetadata is a copy of classic metadata but that doesn't make any validation. It is used when returning data to the API consumers. It is particularly useful when the API returns some entities that are created on the fly and that doesn't necessarily need validation like the kubernetes users.
func NewPublicMetadata ¶
func NewPublicMetadata(name string) PublicMetadata
func (*PublicMetadata) CreateNow ¶
func (m *PublicMetadata) CreateNow()
func (*PublicMetadata) Flatten ¶
func (m *PublicMetadata) Flatten(sensitive bool)
func (*PublicMetadata) GetName ¶
func (m *PublicMetadata) GetName() string
func (*PublicMetadata) UnmarshalJSON ¶
func (m *PublicMetadata) UnmarshalJSON(data []byte) error
func (*PublicMetadata) UnmarshalYAML ¶
func (m *PublicMetadata) UnmarshalYAML(unmarshal func(any) error) error
func (*PublicMetadata) Update ¶
func (m *PublicMetadata) Update(previous PublicMetadata)
type PublicNativeProvider ¶
type PublicProjectMetadata ¶
type PublicProjectMetadata struct {
ProjectMetadataWrapper `json:",inline" yaml:",inline"`
PublicMetadata `json:",inline" yaml:",inline"`
}
PublicProjectMetadata is a copy of classic project metadata but that doesn't make any validation. It is used when returning data to the API consumers. It is particularly useful when the API returns some entities that are created on the fly and that doesn't necessarily need validation like the kubernetes users.
func NewPublicProjectMetadata ¶
func NewPublicProjectMetadata(project string, name string) PublicProjectMetadata
func NewPublicProjectMetadataFromCopy ¶
func NewPublicProjectMetadataFromCopy(metadata ProjectMetadata) PublicProjectMetadata
func (*PublicProjectMetadata) Flatten ¶
func (pm *PublicProjectMetadata) Flatten(sensitive bool)
func (*PublicProjectMetadata) GetName ¶
func (pm *PublicProjectMetadata) GetName() string
func (*PublicProjectMetadata) UnmarshalJSON ¶
func (pm *PublicProjectMetadata) UnmarshalJSON(data []byte) error
This method is needed in the case of JSON otherwise parts of the fields are missed when unmarshalling
func (*PublicProjectMetadata) UnmarshalYAML ¶
func (pm *PublicProjectMetadata) UnmarshalYAML(unmarshal func(any) error) error
This method is needed in the case of YAML otherwise parts of the fields are missed when unmarshalling
type PublicSecret ¶
type PublicSecret struct {
Kind Kind `json:"kind" yaml:"kind"`
Metadata PublicProjectMetadata `json:"metadata" yaml:"metadata"`
Spec PublicSecretSpec `json:"spec" yaml:"spec"`
}
func NewPublicSecret ¶
func NewPublicSecret(s *Secret) *PublicSecret
func (*PublicSecret) GetKind ¶
func (s *PublicSecret) GetKind() string
func (*PublicSecret) GetMetadata ¶
func (s *PublicSecret) GetMetadata() modelAPI.Metadata
func (*PublicSecret) GetSpec ¶
func (s *PublicSecret) GetSpec() any
type PublicSecretSpec ¶
type PublicSecretSpec struct {
BasicAuth *secret.PublicBasicAuth `json:"basicAuth,omitempty" yaml:"basicAuth,omitempty"`
// The HTTP authorization credentials for the targets.
Authorization *secret.PublicAuthorization `json:"authorization,omitempty" yaml:"authorization,omitempty"`
// The Oauth configuration for the targets.
OAuth *secret.PublicOAuth `json:"oauth,omitempty" yaml:"oauth,omitempty"`
// TLSConfig to use to connect to the targets.
TLSConfig *secret.PublicTLSConfig `json:"tlsConfig,omitempty" yaml:"tlsConfig,omitempty"`
}
func NewPublicSecretSpec ¶
func NewPublicSecretSpec(s SecretSpec) PublicSecretSpec
type PublicUser ¶
type PublicUser struct {
Kind Kind `json:"kind"`
Metadata PublicMetadata `json:"metadata"`
Spec PublicUserSpec `json:"spec"`
}
func NewPublicUser ¶
func NewPublicUser(u *User) *PublicUser
func (*PublicUser) GetKind ¶
func (u *PublicUser) GetKind() string
func (*PublicUser) GetMetadata ¶
func (u *PublicUser) GetMetadata() modelAPI.Metadata
func (*PublicUser) GetSpec ¶
func (u *PublicUser) GetSpec() any
type PublicUserSpec ¶
type PublicUserSpec struct {
FirstName string `json:"firstName,omitempty" yaml:"firstName,omitempty"`
LastName string `json:"lastName,omitempty" yaml:"lastName,omitempty"`
NativeProvider PublicNativeProvider `json:"nativeProvider,omitempty" yaml:"nativeProvider,omitempty"`
OauthProviders []OAuthProvider `json:"oauthProviders,omitempty" yaml:"oauthProviders,omitempty"`
}
func NewPublicUserSpec ¶
func NewPublicUserSpec(u UserSpec) PublicUserSpec
type Role ¶
type Role struct {
Kind Kind `json:"kind" yaml:"kind"`
Metadata ProjectMetadata `json:"metadata" yaml:"metadata"`
Spec RoleSpec `json:"spec" yaml:"spec"`
}
Role will be the role you can define in your project/namespace This is a resource that won't be shared across projects.
func (*Role) GetMetadata ¶
func (*Role) UnmarshalJSON ¶
type RoleBinding ¶
type RoleBinding struct {
Kind Kind `json:"kind" yaml:"kind"`
Metadata ProjectMetadata `json:"metadata" yaml:"metadata"`
Spec RoleBindingSpec `json:"spec" yaml:"spec"`
}
RoleBinding will be the roleBinding you can define in your project/namespace This is a resource that won't be shared across projects.
func (*RoleBinding) GetKind ¶
func (r *RoleBinding) GetKind() string
func (*RoleBinding) GetMetadata ¶
func (r *RoleBinding) GetMetadata() modelAPI.Metadata
func (*RoleBinding) GetSpec ¶
func (r *RoleBinding) GetSpec() any
func (*RoleBinding) UnmarshalJSON ¶
func (r *RoleBinding) UnmarshalJSON(data []byte) error
func (*RoleBinding) UnmarshalYAML ¶
func (r *RoleBinding) UnmarshalYAML(unmarshal func(any) error) error
type RoleBindingInterface ¶
type RoleBindingSpec ¶
type RoleBindingSpec struct {
// Name of the Role or GlobalRole concerned by the role binding (metadata.name)
Role string `json:"role" yaml:"role"`
// Subjects that will inherit permissions from the role
Subjects []Subject `json:"subjects" yaml:"subjects"`
}
func (*RoleBindingSpec) UnmarshalJSON ¶
func (r *RoleBindingSpec) UnmarshalJSON(data []byte) error
func (*RoleBindingSpec) UnmarshalYAML ¶
func (r *RoleBindingSpec) UnmarshalYAML(unmarshal func(any) error) error
type RoleInterface ¶
type RoleSpec ¶
type RoleSpec struct {
// List of permissions owned by the role
Permissions []role.Permission `json:"permissions" yaml:"permissions"`
}
type Secret ¶
type Secret struct {
Kind Kind `json:"kind" yaml:"kind"`
Metadata ProjectMetadata `json:"metadata" yaml:"metadata"`
Spec SecretSpec `json:"spec" yaml:"spec"`
}
func (*Secret) GetMetadata ¶
type SecretSpec ¶
type SecretSpec struct {
BasicAuth *secret.BasicAuth `json:"basicAuth,omitempty" yaml:"basicAuth,omitempty"`
// The HTTP authorization credentials for the targets.
Authorization *secret.Authorization `json:"authorization,omitempty" yaml:"authorization,omitempty"`
// Oauth configuration for the targets.
OAuth *secret.OAuth `json:"oauth,omitempty" yaml:"oauth,omitempty"`
// TLSConfig to use to connect to the targets.
TLSConfig *secret.TLSConfig `json:"tlsConfig,omitempty" yaml:"tlsConfig,omitempty"`
}
func (*SecretSpec) FilePaths ¶
func (s *SecretSpec) FilePaths() []string
FilePaths returns every file path referenced by the secret spec (basicAuth.passwordFile, authorization.credentialsFile, oauth.clientSecretFile, tlsConfig.caFile/certFile/keyFile).
func (*SecretSpec) UnmarshalJSON ¶
func (s *SecretSpec) UnmarshalJSON(data []byte) error
func (*SecretSpec) UnmarshalYAML ¶
func (s *SecretSpec) UnmarshalYAML(unmarshal func(any) error) error
type Subject ¶
func (*Subject) UnmarshalJSON ¶
type User ¶
type User struct {
Kind Kind `json:"kind"`
Metadata Metadata `json:"metadata"`
Spec UserSpec `json:"spec"`
}
func (*User) GetMetadata ¶
func (*User) UnmarshalJSON ¶
type UserSpec ¶
type UserSpec struct {
FirstName string `json:"firstName,omitempty" yaml:"firstName,omitempty"`
LastName string `json:"lastName,omitempty" yaml:"lastName,omitempty"`
NativeProvider NativeProvider `json:"nativeProvider,omitempty" yaml:"nativeProvider,omitempty"`
OauthProviders []OAuthProvider `json:"oauthProviders,omitempty" yaml:"oauthProviders,omitempty"`
}
type Variable ¶
type Variable struct {
Kind Kind `json:"kind" yaml:"kind"`
Metadata ProjectMetadata `json:"metadata" yaml:"metadata"`
Spec VariableSpec `json:"spec" yaml:"spec"`
}
Variable relates to variables defined at project level. If you are looking for variable defined at dashboard level, see dashboard.Variable
func (*Variable) GetMetadata ¶
func (*Variable) GetVarSpec ¶
func (v *Variable) GetVarSpec() VariableSpec
type VariableInterface ¶
type VariableInterface interface {
GetMetadata() modelAPI.Metadata
GetVarSpec() VariableSpec
}
type VariableSpec ¶
type VariableSpec struct {
// Kind is the type of the variable. Depending on the value of Kind, it will change the content of Spec.
Kind variable.Kind `json:"kind" yaml:"kind"`
Spec any `json:"spec" yaml:"spec"`
}
func (*VariableSpec) UnmarshalJSON ¶
func (v *VariableSpec) UnmarshalJSON(data []byte) error
func (*VariableSpec) UnmarshalYAML ¶
func (v *VariableSpec) UnmarshalYAML(unmarshal func(any) error) error
type View ¶
type View struct {
// The resource being viewed.
Project string `json:"project" yaml:"project"`
Dashboard string `json:"dashboard" yaml:"dashboard"`
// Stats about the view.
RenderTimeSecs float64 `json:"render_time" yaml:"render_time"`
RenderErrors int `json:"render_errors" yaml:"render_errors"`
}