flags

package
v0.14.1 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2025 License: Apache-2.0 Imports: 16 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AgentResponse

type AgentResponse struct {
	IntervalAllowed int        `json:"intervalAllowed,omitempty"`
	SecretMenu      SecretMenu `json:"secretMenu,omitempty"`
	Flags           []Flag     `json:"flags,omitempty"`
}

type Details

type Details struct {
	Name string `json:"name"`
	ID   string `json:"id"`
}

type Flag

type Flag struct {
	Enabled bool    `json:"enabled"`
	Details Details `json:"details"`
}

type FlagNameChangeRequest

type FlagNameChangeRequest struct {
	Name string `json:"name"`
	ID   string `json:"id"`
}

type Response

type Response struct {
	Flags []Flag `json:"flags"`
}

type SecretMenu

type SecretMenu struct {
	Sequence []string          `json:"sequence,omitempty"`
	Styles   []SecretMenuStyle `json:"styles,omitempty"`
}

type SecretMenuStyle

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

type System

type System struct {
	Config  *ConfigBuilder.Config
	Context context.Context
}

func NewSystem

func NewSystem(cfg *ConfigBuilder.Config) *System

func (*System) CreateFlagInDB

func (s *System) CreateFlagInDB(flag flagCreate) error

func (*System) CreateFlags

func (s *System) CreateFlags(w http.ResponseWriter, r *http.Request)

func (*System) DeleteAllFlagsForEnv

func (s *System) DeleteAllFlagsForEnv(envId string) error

func (*System) DeleteFlagFromDB

func (s *System) DeleteFlagFromDB(flag Flag) error

func (*System) DeleteFlags

func (s *System) DeleteFlags(w http.ResponseWriter, r *http.Request)

func (*System) EditFlag

func (s *System) EditFlag(w http.ResponseWriter, r *http.Request)

func (*System) EditFlagInDB

func (s *System) EditFlagInDB(cr FlagNameChangeRequest) error

func (*System) GetAgentFlags

func (s *System) GetAgentFlags(w http.ResponseWriter, r *http.Request)

func (*System) GetAgentFlagsFromDB

func (s *System) GetAgentFlagsFromDB(projectId, agentId, environmentId string) (*AgentResponse, error)

func (*System) GetClientFlags

func (s *System) GetClientFlags(w http.ResponseWriter, r *http.Request)

func (*System) GetClientFlagsFromDB

func (s *System) GetClientFlagsFromDB(environmentId string) ([]Flag, error)

func (*System) GetDefaultEnvironment

func (s *System) GetDefaultEnvironment(projectId, agentId string) (string, error)

func (*System) SetContext

func (s *System) SetContext(ctx context.Context) *System

func (*System) UpdateFlagInDB

func (s *System) UpdateFlagInDB(flag Flag) error

func (*System) UpdateFlags

func (s *System) UpdateFlags(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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