constants

package
v0.5.4 Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2025 License: MIT Imports: 0 Imported by: 0

Documentation

Overview

Package constants contains the constants for the project service.

Index

Constants

View Source
const (
	// AccessCheckSubject is the subject used for access control checks
	// The subject is of the form: lfx.access_check.request
	AccessCheckSubject = "lfx.access_check.request"
	// AnonymousPrincipal is the identifier for anonymous users
	AnonymousPrincipal = `_anonymous`
)
View Source
const (
	// AuthorizationHeader is the header name for the authorization
	AuthorizationHeader string = "authorization"

	// RequestIDHeader is the header name for the request ID
	RequestIDHeader string = "X-REQUEST-ID"

	// EtagHeader is the header name for the ETag
	EtagHeader string = "ETag"

	// XOnBehalfOfHeader is the header name for the on behalf of principal
	XOnBehalfOfHeader string = "x-on-behalf-of"
)

Constants for the HTTP request headers

View Source
const (
	// KVStoreNameProjects is the name of the KV store for projects.
	KVStoreNameProjects = "projects"

	// KVStoreNameProjectSettings is the name of the KV store for project settings.
	KVStoreNameProjectSettings = "project-settings"
)

NATS Key-Value store bucket names.

View Source
const (
	// IndexProjectSubject is the subject for the project indexing.
	// The subject is of the form: lfx.index.project
	IndexProjectSubject = "lfx.index.project"

	// IndexProjectSettingsSubject is the subject for the project settings indexing.
	// The subject is of the form: lfx.index.project_settings
	IndexProjectSettingsSubject = "lfx.index.project_settings"

	// UpdateAccessProjectSubject is the subject for the project access control updates.
	// The subject is of the form: lfx.update_access.project
	UpdateAccessProjectSubject = "lfx.update_access.project"

	// UpdateAccessProjectSettingsSubject is the subject for the project settings access control updates.
	// The subject is of the form: lfx.update_access.project_settings
	UpdateAccessProjectSettingsSubject = "lfx.update_access.project_settings"

	// DeleteAllAccessSubject is the subject for the project access control deletion.
	// The subject is of the form: lfx.delete_all_access.project
	DeleteAllAccessSubject = "lfx.delete_all_access.project"

	// DeleteAllAccessProjectSettingsSubject is the subject for the project settings access control deletion.
	// The subject is of the form: lfx.delete_all_access.project_settings
	DeleteAllAccessProjectSettingsSubject = "lfx.delete_all_access.project_settings"

	// ProjectSettingsUpdatedSubject is the subject for project settings change events.
	// This event is published when project settings are updated, containing both before and after states.
	// The subject is of the form: lfx.projects-api.project_settings.updated
	ProjectSettingsUpdatedSubject = "lfx.projects-api.project_settings.updated"
)

NATS subjects that the project service sends messages about.

View Source
const (
	// ProjectGetNameSubject is the subject for the project get name.
	// The subject is of the form: lfx.projects-api.get_name
	ProjectGetNameSubject = "lfx.projects-api.get_name"
	// ProjectGetSlugSubject is the subject for the project get slug.
	// The subject is of the form: lfx.projects-api.get_slug
	ProjectGetSlugSubject = "lfx.projects-api.get_slug"
	// ProjectGetLogoSubject is the subject for the project get logo.
	// The subject is of the form: lfx.projects-api.get_logo
	ProjectGetLogoSubject = "lfx.projects-api.get_logo"
	// ProjectSlugToUIDSubject is the subject for the project slug to UID.
	// The subject is of the form: lfx.projects-api.slug_to_uid
	ProjectSlugToUIDSubject = "lfx.projects-api.slug_to_uid"
	// ProjectGetParentUIDSubject is the subject for getting the parent project UID.
	// The subject is of the form: lfx.projects-api.get_parent_uid
	ProjectGetParentUIDSubject = "lfx.projects-api.get_parent_uid"
)

NATS specific subjects that the project service handles messages about.

View Source
const AuthorizationContextID contextAuthorization = "authorization"

AuthorizationContextID is the context ID for the authorization

View Source
const ETagContextID contextEtag = "etag"

ETagContextID is the context ID for the ETag

View Source
const (
	// ErrKey is the key for the error in the context.
	ErrKey = "error"
)

Constants for the application.

View Source
const PrincipalContextID contextPrincipal = "x-on-behalf-of"

PrincipalContextID is the context ID for the principal

View Source
const (
	// ProjectsAPIQueue is the subject name for the projects API.
	// The subject is of the form: lfx.projects-api.queue
	ProjectsAPIQueue = "lfx.projects-api.queue"
)

NATS wildcard subjects that the project service handles messages about.

View Source
const RequestIDContextID contextRequestID = "X-REQUEST-ID"

RequestIDContextID is the context ID for the request ID

Variables

This section is empty.

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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