metadata

package
v0.1.6-rc0 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DomainContext

type DomainContext struct {
	context.Context
	UserRoleBindings    []*projections.UserRoleBinding
	BypassAuthorization bool
}

type DomainMetadataManager

type DomainMetadataManager struct {
	es.MetadataManager
	// contains filtered or unexported fields
}

domainMetadataManager is a domain specific metadata manager.

func NewDomainMetadataManager

func NewDomainMetadataManager(ctx context.Context) (*DomainMetadataManager, error)

NewDomainMetadataManager creates a new domainMetadataManager to handle domain metadata via context.

func (*DomainMetadataManager) BypassAuthorization

func (m *DomainMetadataManager) BypassAuthorization() func()

BypassAuthorization disables authorization checks and returns a function to enable it again

func (*DomainMetadataManager) GetContext

func (m *DomainMetadataManager) GetContext() context.Context

func (*DomainMetadataManager) GetOutgoingGrpcContext

func (m *DomainMetadataManager) GetOutgoingGrpcContext() context.Context

GetOutgoingGrpcContext returns a new context enriched with the metadata of this manager.

func (*DomainMetadataManager) GetRoleBindings

func (m *DomainMetadataManager) GetRoleBindings() []*projections.UserRoleBinding

func (*DomainMetadataManager) GetUserInformation

func (m *DomainMetadataManager) GetUserInformation() *UserInformation

GetUserInformation returns the UserInformation stored in the metadata.

func (*DomainMetadataManager) IsAuthorizationBypassed

func (m *DomainMetadataManager) IsAuthorizationBypassed() bool

func (*DomainMetadataManager) SetComponentInformation

func (m *DomainMetadataManager) SetComponentInformation()

SetComponentInformation sets the ComponentInformation about the currently executing service/component.

func (*DomainMetadataManager) SetRoleBindings

func (m *DomainMetadataManager) SetRoleBindings(roleBindings []*projections.UserRoleBinding)

func (*DomainMetadataManager) SetUserInformation

func (m *DomainMetadataManager) SetUserInformation(userInformation *UserInformation)

SetUserInformation sets the UserInformation in the metadata.

type UserInformation

type UserInformation struct {
	Id     uuid.UUID
	Name   string
	Email  string
	Issuer string
}

UserInformation are identifying information about a user.

Jump to

Keyboard shortcuts

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