secretmenu

package
v0.15.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ButtonDisabled

type ButtonDisabled struct {
	Background   string `json:"background"`
	Padding      string `json:"padding"`
	BorderRadius string `json:"borderRadius"`
	Color        string `json:"color"`
}

type ButtonEnabled

type ButtonEnabled struct {
	Background   string `json:"background"`
	Padding      string `json:"padding"`
	BorderRadius string `json:"borderRadius"`
	Color        string `json:"color"`
}

type CloseButton

type CloseButton struct {
	Position string `json:"position"`
	Top      string `json:"top"`
	Right    string `json:"right"`
	Color    string `json:"color"`
}

type Container

type Container struct {
	Position        string `json:"position"`
	BackgroundColor string `json:"backgroundColor"`
	Color           string `json:"color"`
	BorderRadius    string `json:"borderRadius"`
	BorderStyle     string `json:"borderStyle"`
	BorderColor     string `json:"borderColor"`
	BorderWidth     string `json:"borderWidth"`
	Padding         string `json:"padding"`
}

type EnvironmentDetails

type EnvironmentDetails struct {
	EnvironmentID string `json:"environment_id"`
	Name          string `json:"name"`
}

type Flag

type Flag struct {
	Display         string `json:"display"`
	JustifyContent  string `json:"justifyContent"`
	AlignItems      string `json:"alignItems"`
	Padding         string `json:"padding"`
	BackgroundColor string `json:"backgroundColor"`
	Margin          string `json:"margin"`
	Color           string `json:"color"`
	MinWidth        string `json:"minWidth"`
}
type Header struct {
	FontWeight  int    `json:"fontWeight"`
	Color       string `json:"color"`
	Top         string `json:"top"`
	Position    string `json:"position"`
	MarginRight string `json:"marginRight"`
	MarginLeft  string `json:"marginLeft"`
	Width       string `json:"width"`
}
type MenuStyle struct {
	Id    string `json:"style_id,omitempty"`
	SQLId sql.NullString

	CloseButton    CloseButton `json:"close_button,omitempty"`
	SQLCloseButton sql.NullString

	Container    Container `json:"container,omitempty"`
	SQLContainer sql.NullString

	ResetButton    ResetButton `json:"reset_button,omitempty"`
	SQLResetButton sql.NullString

	Flag    Flag `json:"flag,omitempty"`
	SQLFlag sql.NullString

	ButtonEnabled    ButtonEnabled `json:"button_enabled,omitempty"`
	SQLButtonEnabled sql.NullString

	ButtonDisabled    ButtonDisabled `json:"button_disabled,omitempty"`
	SQLButtonDisabled sql.NullString

	Header    Header `json:"header,omitempty"`
	SQLHeader sql.NullString
}

type ResetButton

type ResetButton struct {
	Position string `json:"position"`
	Top      string `json:"top"`
	Left     string `json:"left"`
	Color    string `json:"color"`
}

type SecretMenu

type SecretMenu struct {
	Id          string             `json:"menu_id"`
	Enabled     bool               `json:"enabled"`
	EnvDetails  EnvironmentDetails `json:"environment_details,omitempty"`
	Sequence    []string           `json:"sequence,omitempty"`
	CustomStyle MenuStyle          `json:"custom_style,omitempty"`
}

type Style

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

type StyleMenu

type StyleMenu struct {
	Id     string  `json:"style_id"`
	Styles []Style `json:"styles"`
}

type System

type System struct {
	Config *ConfigBuilder.Config
}

func NewSystem

func NewSystem(cfg *ConfigBuilder.Config) *System

func (*System) CreateSecretMenu

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

func (*System) CreateSecretMenuInDB

func (s *System) CreateSecretMenuInDB(ctx context.Context, environmentId string, secretMenu SecretMenu) (string, string, error)

func (*System) DeleteSecretMenuForEnv

func (s *System) DeleteSecretMenuForEnv(ctx context.Context, envId string) error

func (*System) GetEnvironmentSecretMenu

func (s *System) GetEnvironmentSecretMenu(ctx context.Context, environmentId string) (SecretMenu, error)

func (*System) GetSecretMenu

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

func (*System) GetSecretMenuFromDB

func (s *System) GetSecretMenuFromDB(ctx context.Context, menuId string) (SecretMenu, error)

func (*System) GetSecretMenuStyle

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

func (*System) GetSecretMenuStyleFromDB

func (s *System) GetSecretMenuStyleFromDB(ctx context.Context, menuId string) (StyleMenu, error)

func (*System) UpdateSecretMenuSequence

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

func (*System) UpdateSecretMenuSequenceInDB

func (s *System) UpdateSecretMenuSequenceInDB(ctx context.Context, menuId string, secretMenu SecretMenu) error

func (*System) UpdateSecretMenuState

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

func (*System) UpdateSecretMenuStateInDB

func (s *System) UpdateSecretMenuStateInDB(ctx context.Context, menuId string) error

func (*System) UpdateSecretMenuStyle

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

func (*System) UpdateSecretMenuStyleInDB

func (s *System) UpdateSecretMenuStyleInDB(ctx context.Context, menuId string, secretMenu SecretMenu) error

Jump to

Keyboard shortcuts

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