http

package
v0.29.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewServer

func NewServer(opts *Options, slackClient *slack.Client, flowSvc *flow.Service, policySvc *policyinternal.Service, gitSvc *git.Service, artifactWriteStorage ArtifactWriteStorage, tracer tracing.Tracer, jwtVerifier *Verifier) error

func ParseBearerToken added in v0.27.4

func ParseBearerToken(token string) (string, error)

func UserFromContext added in v0.27.4

func UserFromContext(ctx context.Context) string

Types

type ArtifactWriteStorage added in v0.6.0

type ArtifactWriteStorage interface {
	// CreateArtifact creates the artifact in the storage and returns an URL for uploading the artifact zipped
	CreateArtifact(artifactSpec artifact.Spec, md5 string) (string, error)
}

type JwkCache added in v0.27.4

type JwkCache interface {
	Get(ctx context.Context, url string) (jwk.Set, error)
	Refresh(ctx context.Context, url string) (jwk.Set, error)
}

type Options

type Options struct {
	Port                int
	Timeout             time.Duration
	GithubWebhookSecret string
	HamCtlAuthToken     string
	DaemonAuthToken     string
	ArtifactAuthToken   string
	S3WebhookSecret     string
}

type Verifier added in v0.27.4

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

func NewVerifier added in v0.27.4

func NewVerifier(ctx context.Context, jwksLocation string, issuer string, audience string) (*Verifier, error)

Jump to

Keyboard shortcuts

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