appinfo

package
v0.0.0-...-d841f61 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2021 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Casconfig   = "casconfig"
	Ldapconfig  = "ldapconfig"
	CrecordName = "crecord_name"
)
View Source
const (
	ObjectCollection          = "object"
	UserInterfaceDocumentID   = "user_interface"
	CanopsisVersionDocumentId = "canopsis_version"
)

Variables

This section is empty.

Functions

func NewApi

func NewApi(
	store Store,
	config libsecurity.Config,
) *api

Types

type CanopsisVersionConf

type CanopsisVersionConf struct {
	Edition string `json:"edition" bson:"edition"`
	Stack   string `json:"stack" bson:"stack"`
	Version string `json:"version" bson:"version"`
}

type IntervalUnit

type IntervalUnit struct {
	Interval uint   `json:"interval" bson:"interval"`
	Unit     string `json:"unit" bson:"unit" binding:"oneof=s h m"`
}

type LogInProvider

type LogInProvider struct {
}

type LoginConfig

type LoginConfig struct {
	Providers  map[string]int `json:"providers,omitempty"`
	Casconfig  interface{}    `json:"casconfig,omitempty"`
	Ldapconfig *struct {
		Enable bool `json:"enable"`
	} `json:"ldapconfig,omitempty"`
}

type LoginConfigResponse

type LoginConfigResponse struct {
	LoginConfig       LoginConfig       `json:"login_config"`
	UserInterfaceConf UserInterfaceConf `json:"user_interface"`
	CanopsisVersionConf
}

type LoginServiceConf

type LoginServiceConf struct {
	CrecordName string                 `json:"crecord_name" bson:"crecord_name"`
	Enable      bool                   `json:"enable" bson:"enable"`
	Fields      map[string]interface{} `bson:",inline"`
}

type PopupTimeout

type PopupTimeout struct {
	Info  *IntervalUnit `json:"info,omitempty" bson:"info,omitempty"`
	Error *IntervalUnit `json:"error,omitempty" bson:"error,omitempty"`
}

type RemediationConf

type RemediationConf struct {
	JobExecutorFetchTimeoutSeconds int64 `json:"jobexecutorfetchtimeoutseconds,omitempty" bson:"jobexecutorfetchtimeoutseconds"`
}

type Store

type Store interface {
	RetrieveObjectConfig() ([]LoginServiceConf, error)
	RetrieveUserInterfaceConfig() (UserInterfaceConf, error)
	RetrieveCanopsisVersionConfig() (CanopsisVersionConf, error)
	RetrieveTimezoneConf() (TimezoneConf, error)
	RetrieveRemediationConf() (RemediationConf, error)
	UpdateUserInterfaceConfig(*UserInterfaceConf) error
	DeleteUserInterfaceConfig() error
}

func NewStore

func NewStore(db mongo.DbClient) Store

NewStore instantiates configuration store.

type TimezoneConf

type TimezoneConf struct {
	Timezone string `json:"timezone,omitempty" bson:"timezone"`
}

type UserInterfaceConf

type UserInterfaceConf struct {
	AppTitle                  string        `json:"app_title,omitempty" bson:"app_title,omitempty"`
	Footer                    string        `json:"footer,omitempty" bson:"footer,omitempty"`
	LoginPageDescription      string        `json:"login_page_description,omitempty" bson:"login_page_description,omitempty"`
	Language                  string        `json:"language,omitempty" bson:"language,omitempty" binding:"oneoforempty=fr en"`
	PopupTimeout              *PopupTimeout `json:"popup_timeout,omitempty" bson:"popup_timeout,omitempty"`
	AllowChangeSeverityToInfo bool          `json:"allow_change_severity_to_info" bson:"allow_change_severity_to_info"`
	MaxMatchedItems           int64         `json:"max_matched_items" bson:"max_matched_items"`
	CheckCountRequestTimeout  int64         `json:"check_count_request_timeout" bson:"check_count_request_timeout"`
}

Jump to

Keyboard shortcuts

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