app

package
v1.0.0-beta.5 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2026 License: MIT Imports: 35 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnsureCertInStatus

func EnsureCertInStatus(pem string, msg proto.Message) error

func ParseCertFromPEMFile

func ParseCertFromPEMFile(pemData string) (*x509.Certificate, error)

Types

type AuditService

type AuditService struct {
	Logger   logger.Logger
	Exchange *events.Exchange
	Manager  infra.SessionManager
	Store    audit.Store
}

func (*AuditService) AuditLog

AuditLog streams audit entries

type BackendService

type BackendService struct {
	Repo *repository.Repo[*backendv1.Backend]

	Exchange *events.Exchange
	Logger   logger.Logger
	// contains filtered or unexported fields
}

func (*BackendService) Create

func (*BackendService) Delete

func (l *BackendService) Delete(ctx context.Context, id keys.ID) error

Delete publishes a delete request and the subscribers are responsible for deleting resources. Once they do, they will update there resource with the status Deleted

func (*BackendService) Get

func (*BackendService) List

func (l *BackendService) List(ctx context.Context, limit int32) ([]*backendv1.Backend, error)

func (*BackendService) Patch

func (l *BackendService) Patch(ctx context.Context, id keys.ID, patch *backendv1.Backend) error

func (*BackendService) Update

func (l *BackendService) Update(ctx context.Context, id keys.ID, be *backendv1.Backend) error

func (*BackendService) UpdateStatus

func (l *BackendService) UpdateStatus(ctx context.Context, id keys.ID, st *backendv1.BackendStatus, mask ...string) error

UpdateStatus implements [routesv1.RouteServieClient]

type CertificateAuthorityService

type CertificateAuthorityService struct {
	Repo *repository.Repo[*cav1.CertificateAuthority]

	Exchange *events.Exchange
	Logger   logger.Logger
	// contains filtered or unexported fields
}

func (*CertificateAuthorityService) Create

func (*CertificateAuthorityService) Delete

func (*CertificateAuthorityService) Get

func (*CertificateAuthorityService) List

func (*CertificateAuthorityService) Patch

func (*CertificateAuthorityService) Update

type CertificateService

type CertificateService struct {
	Repo *repository.Repo[*certv1.Certificate]

	Exchange *events.Exchange
	Logger   logger.Logger
	// contains filtered or unexported fields
}

func (*CertificateService) Create

func (l *CertificateService) Create(ctx context.Context, certificate *certv1.Certificate) (*certv1.Certificate, error)

func (*CertificateService) Delete

func (l *CertificateService) Delete(ctx context.Context, id keys.ID) error

func (*CertificateService) Get

func (*CertificateService) List

func (l *CertificateService) List(ctx context.Context, limit int32) ([]*certv1.Certificate, error)

func (*CertificateService) Patch

func (l *CertificateService) Patch(ctx context.Context, id keys.ID, patch *certv1.Certificate) error

func (*CertificateService) Update

func (l *CertificateService) Update(ctx context.Context, id keys.ID, certificate *certv1.Certificate) error

type CredentialService

type CredentialService struct {
	Repo *repository.Repo[*credentialv1.Credential]

	Exchange *events.Exchange
	Logger   logger.Logger
	// contains filtered or unexported fields
}

func (*CredentialService) Create

func (*CredentialService) Delete

func (l *CredentialService) Delete(ctx context.Context, id keys.ID) error

Delete publishes a delete request and the subscribers are responsible for deleting resources. Once they do, they will update there resource with the status Deleted

func (*CredentialService) Get

func (*CredentialService) List

func (*CredentialService) Patch

func (*CredentialService) Update

func (l *CredentialService) Update(ctx context.Context, id keys.ID, credential *credentialv1.Credential) error

type EventService

type EventService struct {
	Logger   logger.Logger
	Exchange *events.Exchange
	Manager  infra.SessionManager
}

func (*EventService) Publish

func (n *EventService) Publish(ctx context.Context, ev *eventv1.Envelope) (*eventv1.Envelope, error)

Publish implements events.EventServiceClient.

func (*EventService) Subscribe

Subscribe implements events.EventServiceClient.

type IssueResponse

type IssueResponse struct {
	AccessToken string
	ExpiresAt   time.Time
	KeyID       string
	TokenType   string
}

type MetricsService

type MetricsService struct {
	Logger   logger.Logger
	Exchange *events.Exchange
	Metrics  *proxy.ProxyMetrics
}

func (*MetricsService) MetricsLog

func (n *MetricsService) MetricsLog(ctx context.Context) (*proxy.ProxyMetrics, error)

MetricsLog streams metrics entries

type PolicyService

type PolicyService struct {
	Repo *repository.Repo[*policyv1.Policy]

	Exchange *events.Exchange
	Logger   logger.Logger
	// contains filtered or unexported fields
}

func (*PolicyService) Create

func (l *PolicyService) Create(ctx context.Context, policy *policyv1.Policy) (*policyv1.Policy, error)

func (*PolicyService) Delete

func (l *PolicyService) Delete(ctx context.Context, id keys.ID) error

func (*PolicyService) Get

func (l *PolicyService) Get(ctx context.Context, id keys.ID) (*policyv1.Policy, error)

func (*PolicyService) List

func (l *PolicyService) List(ctx context.Context, limit int32) ([]*policyv1.Policy, error)

func (*PolicyService) Patch

func (l *PolicyService) Patch(ctx context.Context, id keys.ID, patch *policyv1.Policy) error

func (*PolicyService) Update

func (l *PolicyService) Update(ctx context.Context, id keys.ID, policy *policyv1.Policy) error

type RouteService

type RouteService struct {
	Repo *repository.Repo[*routev1.Route]

	Exchange *events.Exchange
	Logger   logger.Logger
	// contains filtered or unexported fields
}

func (*RouteService) Create

func (l *RouteService) Create(ctx context.Context, route *routev1.Route) (*routev1.Route, error)

func (*RouteService) Delete

func (l *RouteService) Delete(ctx context.Context, id keys.ID) error

Delete publishes a delete request and the subscribers are responsible for deleting resources. Once they do, they will update there resource with the status Deleted

func (*RouteService) Get

func (l *RouteService) Get(ctx context.Context, id keys.ID) (*routev1.Route, error)

func (*RouteService) List

func (l *RouteService) List(ctx context.Context, limit int32) ([]*routev1.Route, error)

func (*RouteService) Patch

func (l *RouteService) Patch(ctx context.Context, id keys.ID, patch *routev1.Route) error

func (*RouteService) Update

func (l *RouteService) Update(ctx context.Context, id keys.ID, route *routev1.Route) error

func (*RouteService) UpdateStatus

func (l *RouteService) UpdateStatus(ctx context.Context, id keys.ID, st *routev1.RouteStatus, mask ...string) error

UpdateStatus implements [routesv1.RouteServieClient]

type TokenManager

type TokenManager interface {
	Issue(ctx context.Context, token *tokenv1.Token) (string, error)
	Revoke(ctx context.Context, token *tokenv1.Token) error
}

type TokenService

type TokenService struct {
	// Repo     *repository.Repo[*tokenv1.Token]
	Exchange     *events.Exchange
	Logger       logger.Logger
	Key          *ecdsa.PrivateKey
	DefaultTTL   time.Duration
	MaxTTL       time.Duration
	DefaultAud   []string
	Issuer       string
	SigningKeyID string
}

func (*TokenService) IssueToken

func (*TokenService) Revoke

func (s *TokenService) Revoke(ctx context.Context, id keys.ID) error

Revoke publishes a delete request and the subscribers are responsible for deleting resources. Once they do, they will update there resource with the status Deleted

type TokenValidator

type TokenValidator interface {
	Validate(ctx context.Context, rawToken string) (proxy.Principal, error)
}

Jump to

Keyboard shortcuts

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