Documentation
¶
Index ¶
Constants ¶
View Source
const ( GitlabVersionManifestPath = "/opt/gitlab/version-manifest.txt" PreloadEventsPeriodDays = 30 CleanAuthLogEventsPeriod = 60 * time.Hour * 24 // time to keep the auth events in the DB )
View Source
const ( AuditEventLoginWithTwoFactor = "two-factor" AuditEventLoginWithU2F = "two-factor-via-u2f-device" AuditEventLoginWithWebAuthn = "two-factor-via-webauthn-device" AuditEventLoginStandard = "standard" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuditEvent ¶
type AuditEvent struct {
ID uint64 `gorm:"primary_key" json:"-"`
CorrelationID string `gorm:"type:varchar(64)" json:"correlation_id"`
Severity string `json:"severity"`
Time time.Time `json:"time"`
AuthorID int64 `json:"author_id"`
AuthorName string `json:"author_name"`
EntityID int64 `json:"entity_id"`
EntityType AuthorClass `json:"entity_type"`
IPAddress string `json:"ip_address"`
With *With `json:"with,omitempty"`
TargetID *int64 `json:"target_id"`
TargetType AuthorClass `json:"target_type"`
TargetDetails *string `json:"target_details"`
EntityPath string `json:"entity_path"`
Remove *Add `json:"remove,omitempty"`
Add *Add `json:"add,omitempty"`
// Details *Details `json:"details,omitempty"`
// PushAccessLevels []MergeAccessLevelElement `json:"push_access_levels,omitempty"`
// MergeAccessLevels []MergeAccessLevelElement `json:"merge_access_levels,omitempty"`
AllowForcePush *bool `json:"allow_force_push,omitempty"`
CodeOwnerApprovalRequired *bool `json:"code_owner_approval_required,omitempty"`
AuthorClass *AuthorClass `json:"author_class,omitempty"`
CustomMessage *string `json:"custom_message,omitempty"`
As *As `json:"as,omitempty"`
MemberID *int64 `json:"member_id,omitempty"`
Change *Change `json:"change,omitempty"`
From *string `json:"from,omitempty"`
To *string `json:"to,omitempty"`
Action *string `json:"action,omitempty"`
ExpiryFrom *string `json:"expiry_from"`
ExpiryTo *string `json:"expiry_to"`
MetaCallerID string `json:"meta.caller_id"`
MetaRemoteIP string `json:"meta.remote_ip"`
MetaFeatureCategory string `json:"meta.feature_category"`
MetaClientID string `json:"meta.client_id"`
MetaUser string `json:"meta.user,omitempty"`
MetaUserID int `json:"meta.user_id,omitempty"`
OriginalData datatypes.JSON
}
type AuthEvent ¶ added in v0.5.0
type AuthEvent struct {
ID uint64 `gorm:"primary_key" json:"-"`
CorrelationID string `gorm:"type:varchar(64)" json:"correlation_id"`
Severity string `json:"severity"`
Time time.Time `json:"time"`
Message *string `json:"message,omitempty"`
Env *string `json:"env,omitempty"`
RemoteIP *string `json:"remote_ip,omitempty"`
RequestMethod *string `json:"request_method,omitempty"`
Path *string `json:"path,omitempty"`
MetaCallerID *string `json:"meta.caller_id,omitempty"`
MetaRemoteIP *string `json:"meta.remote_ip,omitempty"`
MetaFeatureCategory *string `json:"meta.feature_category,omitempty"`
MetaClientID *string `json:"meta.client_id,omitempty"`
ScopeType *string `json:"scope_type,omitempty"`
RequestedProjectPath *string `json:"requested_project_path,omitempty"`
// RequestedActions []string `json:"requested_actions,omitempty"`
// AuthorizedActions []string `json:"authorized_actions,omitempty"`
HTTPUser *string `json:"http_user,omitempty"`
AuthService *string `json:"auth_service,omitempty"`
AuthResultType *string `json:"auth_result.type"`
AuthResultActorType *string `json:"auth_result.actor_type"`
PayloadType *string `json:"payload_type,omitempty"`
OriginalData datatypes.JSON
}
type AuthorClass ¶
type AuthorClass string
const ( AuthorClassCiGroupVariable AuthorClass = "Ci::GroupVariable" AuthorClassEmail AuthorClass = "Email" AuthorClassGroup AuthorClass = "Group" AuthorClassProject AuthorClass = "Project" AuthorClassUser AuthorClass = "User" CiRunner AuthorClass = "Ci::Runner" PersonalAccessToken AuthorClass = "PersonalAccessToken" ProtectedBranch AuthorClass = "ProtectedBranch" )
type GitLabLogStreamer ¶ added in v0.5.0
type GitLabLogStreamer struct {
// contains filtered or unexported fields
}
func NewGitLabLogStreamer ¶ added in v0.5.0
func NewGitLabLogStreamer(config Config) (*GitLabLogStreamer, error)
func (*GitLabLogStreamer) Watch ¶ added in v0.5.0
func (s *GitLabLogStreamer) Watch() error
type MergeAccessLevelElement ¶
type MergeAccessLevelElement string
const (
Maintainers MergeAccessLevelElement = "Maintainers"
)
Source Files
¶
Click to show internal directories.
Click to hide internal directories.