Documentation
¶
Overview ¶
Copyright (C) 2023 Tim Bastin, l3montree UG (haftungsbeschränkt)
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
Index ¶
- Variables
- func GetAsset(c Context) models.Asset
- func GetAssetSlug(c Context) (string, error)
- func GetAuthAdminClient(c Context) *client.APIClient
- func GetFlawID(c Context) (string, error)
- func GetOrgSlug(c Context) (string, error)
- func GetOryClient(c Context) *client.APIClient
- func GetParam(c Context, param string) string
- func GetProject(c Context) models.Project
- func GetProjectSlug(c Context) (string, error)
- func GetRBAC(c Context) accesscontrol.AccessControl
- func GetRepositoryID(c Context) (string, error)
- func GetTenant(c Context) models.Org
- func InitLogger()
- func IsPublicRequest(c Context) bool
- func LoadConfig() error
- func Ptr[T any](t T) *T
- func SanitizeParam(s string) string
- func SetAsset(c Context, asset models.Asset)
- func SetAssetSlug(c Context, assetSlug string)
- func SetAuthAdminClient(c Context, i *client.APIClient)
- func SetIsPublicRequest(c Context)
- func SetOrgSlug(c Context, orgSlug string)
- func SetProject(c Context, project models.Project)
- func SetProjectSlug(c Context, projectSlug string)
- func SetSession(ctx Context, session AuthSession)
- func SetThirdPartyIntegration(c Context, i IntegrationAggregate)
- type AuthSession
- type Context
- type DB
- type Environmental
- type FilterQuery
- type FlawEvent
- type IntegrationAggregate
- type IntegrationID
- type ManualMitigateEvent
- type MiddlewareFunc
- type PageInfo
- type Paged
- type Repository
- type Server
- type SortQuery
- type ThirdPartyIntegration
- type User
Constants ¶
This section is empty.
Variables ¶
var V = validator.New()
Functions ¶
func GetAssetSlug ¶
func GetAuthAdminClient ¶ added in v0.4.19
func GetOrgSlug ¶ added in v0.5.1
func GetOryClient ¶
func GetProject ¶
func GetProjectSlug ¶
func GetRBAC ¶
func GetRBAC(c Context) accesscontrol.AccessControl
func GetRepositoryID ¶ added in v0.5.15
func InitLogger ¶
func InitLogger()
InitLogger initializes the logger with a tint handler. tint is a simple logging library that allows to add colors to the log output. this is obviously not required, but it makes the logs easier to read.
func IsPublicRequest ¶ added in v0.5.14
func LoadConfig ¶
func LoadConfig() error
func SanitizeParam ¶
func SetAssetSlug ¶ added in v0.5.14
func SetAuthAdminClient ¶ added in v0.4.19
func SetIsPublicRequest ¶ added in v0.5.14
func SetIsPublicRequest(c Context)
func SetOrgSlug ¶ added in v0.5.14
func SetProject ¶ added in v0.5.15
func SetProjectSlug ¶ added in v0.5.14
func SetSession ¶ added in v0.5.14
func SetSession(ctx Context, session AuthSession)
func SetThirdPartyIntegration ¶ added in v0.4.19
func SetThirdPartyIntegration(c Context, i IntegrationAggregate)
Types ¶
type AuthSession ¶
type AuthSession interface {
GetUserID() string
}
func GetSession ¶
func GetSession(ctx Context) AuthSession
type Environmental ¶
type Environmental struct {
ConfidentialityRequirements string
IntegrityRequirements string
AvailabilityRequirements string
}
func GetEnvironmental ¶
func GetEnvironmental(ctx Context) Environmental
func GetEnvironmentalFromAsset ¶
func GetEnvironmentalFromAsset(m models.Asset) Environmental
func SanitizeEnv ¶
func SanitizeEnv(env Environmental) Environmental
type FilterQuery ¶
type FilterQuery struct {
// contains filtered or unexported fields
}
func GetFilterQuery ¶
func GetFilterQuery(ctx Context) []FilterQuery
func (FilterQuery) SQL ¶
func (f FilterQuery) SQL() string
func (FilterQuery) Value ¶
func (f FilterQuery) Value() any
type IntegrationAggregate ¶ added in v0.5.14
type IntegrationAggregate interface {
ThirdPartyIntegration
GetIntegration(id IntegrationID) ThirdPartyIntegration
}
func GetThirdPartyIntegration ¶ added in v0.4.19
func GetThirdPartyIntegration(c Context) IntegrationAggregate
type IntegrationID ¶ added in v0.5.14
type IntegrationID string
const ( GitLabIntegrationID IntegrationID = "gitlab" GitHubIntegrationID IntegrationID = "github" AggregateID IntegrationID = "aggregate" )
type ManualMitigateEvent ¶ added in v0.5.1
type ManualMitigateEvent struct {
Ctx Context
}
type MiddlewareFunc ¶
type MiddlewareFunc = echo.MiddlewareFunc