Documentation ¶
Index ¶
- Constants
- Variables
- func DescribePermission(permission uint32) string
- func GetPermissionName(permission uint32) string
- func GetPermissionNames(permission uint32) (retval []string)
- func PermissionFromRoles(userroles []string) uint32
- type AuthenticationEncryptionConfiguration
- type DefaultAccessConfiguration
- type GoogleOauthConfiguration
- type MongoConfiguration
- type Role
- type RolesConfiguration
- type ServiceConfiguration
- type SlickConfiguration
- type TLSEncryptionConfiguration
Constants ¶
View Source
const ( PERMISSION_ADMIN uint32 = 1 << iota PERMISSION_BUILD_WRITE PERMISSION_BUILD_DELETE PERMISSION_TESTCASE_WRITE PERMISSION_TESTCASE_DELETE PERMISSION_TESTPLAN_WRITE PERMISSION_TESTPLAN_DELETE PERMISSION_TESTRUN_WRITE PERMISSION_TESTRUN_DELETE PERMISSION_RESULT_WRITE PERMISSION_RESULT_DELETE PERMISSION_REPORT_GENERATE )
View Source
const (
ConfigurationEnvironmentVariableName = "SLICKCONF"
)
Variables ¶
View Source
var ( DefaultRoles = []Role{ Role{ Name: "Project Admin", Description: "An admin of a project has complete control over it.", Permission: PERMISSION_ADMIN, }, Role{ Name: "Tester", Description: "An admin of a project has complete control over it.", Permission: PERMISSION_RESULT_WRITE | PERMISSION_TESTCASE_WRITE, }, Role{ Name: "Test Manager", Description: "Someone who can organize and kick off tests, and fix other's mistakes (delete tests, and testplans)", Permission: PERMISSION_BUILD_WRITE | PERMISSION_RESULT_WRITE | PERMISSION_TESTCASE_WRITE | PERMISSION_TESTCASE_DELETE | PERMISSION_TESTPLAN_WRITE | PERMISSION_TESTPLAN_DELETE | PERMISSION_TESTRUN_WRITE, }, Role{ Name: "Report Generator", Description: "Can generate the read only reports for others to view.", Permission: PERMISSION_REPORT_GENERATE, }, Role{ Name: "Result Deleter", Description: "Can delete results, testruns, and builds (dangerous)", Permission: PERMISSION_RESULT_DELETE | PERMISSION_TESTRUN_DELETE | PERMISSION_BUILD_DELETE, }, Role{ Name: "Build Engineer", Description: "Can create new builds", Permission: PERMISSION_BUILD_WRITE, }, } )
Functions ¶
func DescribePermission ¶
func GetPermissionName ¶
func GetPermissionNames ¶
func PermissionFromRoles ¶
Types ¶
type DefaultAccessConfiguration ¶
type DefaultAccessConfiguration struct { Company string `toml:"company-name" comment:"The company name for the projects you want to give access to."` Projects []string `toml:"projects" comment:"The list of projects you want every user who logs in to have read only access to."` Admin string `` /* 129-byte string literal not displayed */ }
type MongoConfiguration ¶
type MongoConfiguration struct { URL string `` /* 156-byte string literal not displayed */ Database string `toml:"database" comment:"The name of the database to use for slick."` UseTLS bool `` /* 185-byte string literal not displayed */ RootCertificatesLocation string `` /* 133-byte string literal not displayed */ }
type RolesConfiguration ¶
type RolesConfiguration struct {
Defaults []Role `toml:"default-roles" comment:"The default roles that slick gives (can be customized per-project)."`
}
type ServiceConfiguration ¶
type ServiceConfiguration struct { BaseUrl string `toml:"base-url" comment:"You must supply a base url for slick. If you change it you have to regenerate certificates."` ListenIP string `toml:"listen-ip" comment:"The IP address to listen on. If you want to listen on all interfaces use 0.0.0.0."` ListenPort int `` /* 150-byte string literal not displayed */ LocalWebFilesPath string `` /* 169-byte string literal not displayed */ }
type SlickConfiguration ¶
type SlickConfiguration struct { Common ServiceConfiguration `toml:"common"` DefaultAccess DefaultAccessConfiguration `toml:"default-access"` Google GoogleOauthConfiguration `` /* 208-byte string literal not displayed */ Mongo MongoConfiguration `toml:"mongo"` Roles RolesConfiguration `toml:"roles"` TLSEncryption TLSEncryptionConfiguration `toml:"tls-encryption"` TokenEncryption AuthenticationEncryptionConfiguration `toml:"token-encryption"` }
var (
Configuration SlickConfiguration
)
func (*SlickConfiguration) Load ¶
func (c *SlickConfiguration) Load(data []byte)
func (*SlickConfiguration) LoadFromLocation ¶
func (c *SlickConfiguration) LoadFromLocation(location string)
func (*SlickConfiguration) LoadFromStandardLocations ¶
func (c *SlickConfiguration) LoadFromStandardLocations()
func (*SlickConfiguration) ToBytes ¶
func (c *SlickConfiguration) ToBytes() ([]byte, error)
Click to show internal directories.
Click to hide internal directories.