enumdef

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2024 License: Apache-2.0 Imports: 4 Imported by: 16

Documentation

Index

Constants

View Source
const (
	PolicySourceUserAvatar = "user.avatar"
)

Variables

View Source
var (
	UserRoleAdmin = enum.New[UserRole](1, "admin")
	UserRoleUser  = enum.New[UserRole](2, "user")
)

Functions

func FilePolicyToken added in v0.7.0

func FilePolicyToken(source PolicySource, token string) string

func OAuth2ClientConfidentialRequirementTypeToGRPC added in v0.6.0

func OAuth2ClientConfidentialRequirementTypeToGRPC(req OAuth2ClientConfidentialRequirement) dto.OAuth2ClientConfidentialRequirement

func ParseFilePolicyToken added in v0.7.0

func ParseFilePolicyToken(token string) (string, string, bool)

func TemporaryFileCommandToGRPC added in v0.7.0

func TemporaryFileCommandToGRPC(req TemporaryFileCommand) dto.FileCommandTemporaryFile

Types

type OAuth2ClientConfidentialRequirement added in v0.6.0

type OAuth2ClientConfidentialRequirement int
const (
	CRTRequire OAuth2ClientConfidentialRequirement = iota
	CRTNotRequire
	CRTDependOnType
)

func OAuth2ClientConfidentialRequirementTypeFromGRPC added in v0.6.0

func OAuth2ClientConfidentialRequirementTypeFromGRPC(req dto.OAuth2ClientConfidentialRequirement) OAuth2ClientConfidentialRequirement

type PolicySource added in v0.7.0

type PolicySource string

type SubjectType added in v0.6.0

type SubjectType int
const (
	SubjectUser SubjectType = iota
	SubjectClient
)

type TemporaryFileCommand added in v0.7.0

type TemporaryFileCommand string
const (
	// TemporaryFileCommandSaveAsImage represents the action of saving the file
	// as an image to persistent storage and deleting the temporary file.
	TemporaryFileCommandDelete TemporaryFileCommand = "delete"

	// TemporaryFileCommandSaveAsImage represents the action of saving the file
	// as an image to persistent storage and deleting the temporary file.
	TemporaryFileCommandSaveAsImage TemporaryFileCommand = "save_as_image"

	// TemporaryFileCommandChangeImageType represents the action of changing the
	// image file to another type. This command is only valid if the file is an
	// image.
	TemporaryFileCommandChangeImageType TemporaryFileCommand = "change_image_type"

	// TemporaryFileCommandImageMetadata represents the action of retrieving the
	// image metadata. This command is only valid if the file is an image.
	TemporaryFileCommandImageMetadata TemporaryFileCommand = "image_metadata"
)

func TemporaryFileCommandFromGRPC added in v0.7.0

func TemporaryFileCommandFromGRPC(req dto.FileCommandTemporaryFile) TemporaryFileCommand

type UserRole

type UserRole int

Jump to

Keyboard shortcuts

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