reposettings

package
v1.0.4-gitspaces-beta Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

WireSet provides a wire set for this package.

Functions

func GetGeneralSettingsAsKeyValues

func GetGeneralSettingsAsKeyValues(s *GeneralSettings) []settings.KeyValue

func GetGeneralSettingsMappings

func GetGeneralSettingsMappings(s *GeneralSettings) []settings.SettingHandler

func GetSecuritySettingsAsKeyValues

func GetSecuritySettingsAsKeyValues(s *SecuritySettings) []settings.KeyValue

func GetSecuritySettingsMappings

func GetSecuritySettingsMappings(s *SecuritySettings) []settings.SettingHandler

Types

type Controller

type Controller struct {
	// contains filtered or unexported fields
}

func NewController

func NewController(
	authorizer authz.Authorizer,
	repoStore store.RepoStore,
	settings *settings.Service,
	auditService audit.Service,
) *Controller

func ProvideController

func ProvideController(
	authorizer authz.Authorizer,
	repoStore store.RepoStore,
	settings *settings.Service,
	auditService audit.Service,
) *Controller

func (*Controller) GeneralFind

func (c *Controller) GeneralFind(
	ctx context.Context,
	session *auth.Session,
	repoRef string,
) (*GeneralSettings, error)

GeneralFind returns the general settings of a repo.

func (*Controller) GeneralUpdate

func (c *Controller) GeneralUpdate(
	ctx context.Context,
	session *auth.Session,
	repoRef string,
	in *GeneralSettings,
) (*GeneralSettings, error)

GeneralUpdate updates the general settings of the repo.

func (*Controller) SecurityFind

func (c *Controller) SecurityFind(
	ctx context.Context,
	session *auth.Session,
	repoRef string,
) (*SecuritySettings, error)

SecurityFind returns the security settings of a repo.

func (*Controller) SecurityUpdate

func (c *Controller) SecurityUpdate(
	ctx context.Context,
	session *auth.Session,
	repoRef string,
	in *SecuritySettings,
) (*SecuritySettings, error)

SecurityUpdate updates the security settings of the repo.

type GeneralSettings

type GeneralSettings struct {
	FileSizeLimit *int64 `json:"file_size_limit" yaml:"file_size_limit"`
}

GeneralSettings represent the general repository settings as exposed externally.

func GetDefaultGeneralSettings

func GetDefaultGeneralSettings() *GeneralSettings

type SecuritySettings

type SecuritySettings struct {
	SecretScanningEnabled *bool `json:"secret_scanning_enabled" yaml:"secret_scanning_enabled"`
}

SecuritySettings represents the security related part of repository settings as exposed externally.

func GetDefaultSecuritySettings

func GetDefaultSecuritySettings() *SecuritySettings

Jump to

Keyboard shortcuts

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