audit

package
v0.26.1 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Resolve

func Resolve(ctx context.Context, source string) audit.ChangeOrigin

Resolve will obtain the change origin information based on the provided source, if the source is not recognized or any error occurs during resolution, it will return a default change origin with "unknown" author and "optimus_cli" source.

func ToContext

func ToContext(ctx context.Context, origin audit.ChangeOrigin) context.Context

Types

type GitlabAuditSource

type GitlabAuditSource struct {
	*gitlab.Client
	// contains filtered or unexported fields
}

func NewGitlabAuditSource

func NewGitlabAuditSource(projectID, token, host string) (*GitlabAuditSource, error)

func NewGitlabAuditSourceFromEnv

func NewGitlabAuditSourceFromEnv() (*GitlabAuditSource, error)

func (*GitlabAuditSource) GetChangeOrigin

func (g *GitlabAuditSource) GetChangeOrigin(ctx context.Context) audit.ChangeOrigin

Jump to

Keyboard shortcuts

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