middleware

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RoleManagerAuthorizationMiddleware

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

func NewRoleManagerAuthorizationMiddleware

func NewRoleManagerAuthorizationMiddleware(entityType string, svc roles.RoleManager, authz smqauthz.Authorization, opPerm map[svcutil.Operation]svcutil.Permission) (RoleManagerAuthorizationMiddleware, error)

AuthorizationMiddleware adds authorization to the clients service.

func (RoleManagerAuthorizationMiddleware) AddRole

func (ram RoleManagerAuthorizationMiddleware) AddRole(ctx context.Context, session authn.Session, entityID, roleName string, optionalActions []string, optionalMembers []string) (roles.Role, error)

func (RoleManagerAuthorizationMiddleware) ListAvailableActions

func (ram RoleManagerAuthorizationMiddleware) ListAvailableActions(ctx context.Context, session authn.Session) ([]string, error)

func (RoleManagerAuthorizationMiddleware) RemoveMemberFromAllRoles

func (ram RoleManagerAuthorizationMiddleware) RemoveMemberFromAllRoles(ctx context.Context, session authn.Session, memberID string) (err error)

func (RoleManagerAuthorizationMiddleware) RemoveRole

func (ram RoleManagerAuthorizationMiddleware) RemoveRole(ctx context.Context, session authn.Session, entityID, roleName string) error

func (RoleManagerAuthorizationMiddleware) RetrieveAllRoles

func (ram RoleManagerAuthorizationMiddleware) RetrieveAllRoles(ctx context.Context, session authn.Session, entityID string, limit, offset uint64) (roles.RolePage, error)

func (RoleManagerAuthorizationMiddleware) RetrieveRole

func (ram RoleManagerAuthorizationMiddleware) RetrieveRole(ctx context.Context, session authn.Session, entityID, roleName string) (roles.Role, error)

func (RoleManagerAuthorizationMiddleware) RoleAddActions

func (ram RoleManagerAuthorizationMiddleware) RoleAddActions(ctx context.Context, session authn.Session, entityID, roleName string, actions []string) (ops []string, err error)

func (RoleManagerAuthorizationMiddleware) RoleAddMembers

func (ram RoleManagerAuthorizationMiddleware) RoleAddMembers(ctx context.Context, session authn.Session, entityID, roleName string, members []string) ([]string, error)

func (RoleManagerAuthorizationMiddleware) RoleCheckActionsExists

func (ram RoleManagerAuthorizationMiddleware) RoleCheckActionsExists(ctx context.Context, session authn.Session, entityID, roleName string, actions []string) (bool, error)

func (RoleManagerAuthorizationMiddleware) RoleCheckMembersExists

func (ram RoleManagerAuthorizationMiddleware) RoleCheckMembersExists(ctx context.Context, session authn.Session, entityID, roleName string, members []string) (bool, error)

func (RoleManagerAuthorizationMiddleware) RoleListActions

func (ram RoleManagerAuthorizationMiddleware) RoleListActions(ctx context.Context, session authn.Session, entityID, roleName string) ([]string, error)

func (RoleManagerAuthorizationMiddleware) RoleListMembers

func (ram RoleManagerAuthorizationMiddleware) RoleListMembers(ctx context.Context, session authn.Session, entityID, roleName string, limit, offset uint64) (roles.MembersPage, error)

func (RoleManagerAuthorizationMiddleware) RoleRemoveActions

func (ram RoleManagerAuthorizationMiddleware) RoleRemoveActions(ctx context.Context, session authn.Session, entityID, roleName string, actions []string) (err error)

func (RoleManagerAuthorizationMiddleware) RoleRemoveAllActions

func (ram RoleManagerAuthorizationMiddleware) RoleRemoveAllActions(ctx context.Context, session authn.Session, entityID, roleName string) error

func (RoleManagerAuthorizationMiddleware) RoleRemoveAllMembers

func (ram RoleManagerAuthorizationMiddleware) RoleRemoveAllMembers(ctx context.Context, session authn.Session, entityID, roleName string) (err error)

func (RoleManagerAuthorizationMiddleware) RoleRemoveMembers

func (ram RoleManagerAuthorizationMiddleware) RoleRemoveMembers(ctx context.Context, session authn.Session, entityID, roleName string, members []string) (err error)

func (RoleManagerAuthorizationMiddleware) UpdateRoleName

func (ram RoleManagerAuthorizationMiddleware) UpdateRoleName(ctx context.Context, session authn.Session, entityID, oldRoleName, newRoleName string) (roles.Role, error)

type RoleManagerLoggingMiddleware

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

func NewRoleManagerLoggingMiddleware

func NewRoleManagerLoggingMiddleware(svcName string, svc roles.RoleManager, logger *slog.Logger) RoleManagerLoggingMiddleware

func (*RoleManagerLoggingMiddleware) AddRole

func (lm *RoleManagerLoggingMiddleware) AddRole(ctx context.Context, session authn.Session, entityID, roleName string, optionalActions []string, optionalMembers []string) (ro roles.Role, err error)

func (*RoleManagerLoggingMiddleware) ListAvailableActions

func (lm *RoleManagerLoggingMiddleware) ListAvailableActions(ctx context.Context, session authn.Session) (acts []string, err error)

func (*RoleManagerLoggingMiddleware) RemoveMemberFromAllRoles

func (lm *RoleManagerLoggingMiddleware) RemoveMemberFromAllRoles(ctx context.Context, session authn.Session, memberID string) (err error)

func (*RoleManagerLoggingMiddleware) RemoveRole

func (lm *RoleManagerLoggingMiddleware) RemoveRole(ctx context.Context, session authn.Session, entityID, roleName string) (err error)

func (*RoleManagerLoggingMiddleware) RetrieveAllRoles

func (lm *RoleManagerLoggingMiddleware) RetrieveAllRoles(ctx context.Context, session authn.Session, entityID string, limit, offset uint64) (rp roles.RolePage, err error)

func (*RoleManagerLoggingMiddleware) RetrieveRole

func (lm *RoleManagerLoggingMiddleware) RetrieveRole(ctx context.Context, session authn.Session, entityID, roleName string) (ro roles.Role, err error)

func (*RoleManagerLoggingMiddleware) RoleAddActions

func (lm *RoleManagerLoggingMiddleware) RoleAddActions(ctx context.Context, session authn.Session, entityID, roleName string, actions []string) (caps []string, err error)

func (*RoleManagerLoggingMiddleware) RoleAddMembers

func (lm *RoleManagerLoggingMiddleware) RoleAddMembers(ctx context.Context, session authn.Session, entityID, roleName string, members []string) (mems []string, err error)

func (*RoleManagerLoggingMiddleware) RoleCheckActionsExists

func (lm *RoleManagerLoggingMiddleware) RoleCheckActionsExists(ctx context.Context, session authn.Session, entityID, roleName string, actions []string) (bool, error)

func (*RoleManagerLoggingMiddleware) RoleCheckMembersExists

func (lm *RoleManagerLoggingMiddleware) RoleCheckMembersExists(ctx context.Context, session authn.Session, entityID, roleName string, members []string) (bool, error)

func (*RoleManagerLoggingMiddleware) RoleListActions

func (lm *RoleManagerLoggingMiddleware) RoleListActions(ctx context.Context, session authn.Session, entityID, roleName string) (roOps []string, err error)

func (*RoleManagerLoggingMiddleware) RoleListMembers

func (lm *RoleManagerLoggingMiddleware) RoleListMembers(ctx context.Context, session authn.Session, entityID, roleName string, limit, offset uint64) (mp roles.MembersPage, err error)

func (*RoleManagerLoggingMiddleware) RoleRemoveActions

func (lm *RoleManagerLoggingMiddleware) RoleRemoveActions(ctx context.Context, session authn.Session, entityID, roleName string, actions []string) (err error)

func (*RoleManagerLoggingMiddleware) RoleRemoveAllActions

func (lm *RoleManagerLoggingMiddleware) RoleRemoveAllActions(ctx context.Context, session authn.Session, entityID, roleName string) (err error)

func (*RoleManagerLoggingMiddleware) RoleRemoveAllMembers

func (lm *RoleManagerLoggingMiddleware) RoleRemoveAllMembers(ctx context.Context, session authn.Session, entityID, roleName string) (err error)

func (*RoleManagerLoggingMiddleware) RoleRemoveMembers

func (lm *RoleManagerLoggingMiddleware) RoleRemoveMembers(ctx context.Context, session authn.Session, entityID, roleName string, members []string) (err error)

func (*RoleManagerLoggingMiddleware) UpdateRoleName

func (lm *RoleManagerLoggingMiddleware) UpdateRoleName(ctx context.Context, session authn.Session, entityID, oldRoleName, newRoleName string) (ro roles.Role, err error)

type RoleManagerMetricsMiddleware

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

func NewRoleManagerMetricsMiddleware

func NewRoleManagerMetricsMiddleware(svcName string, svc roles.RoleManager, counter metrics.Counter, latency metrics.Histogram) RoleManagerMetricsMiddleware

func (*RoleManagerMetricsMiddleware) AddRole

func (rmm *RoleManagerMetricsMiddleware) AddRole(ctx context.Context, session authn.Session, entityID, roleName string, optionalActions []string, optionalMembers []string) (roles.Role, error)

func (*RoleManagerMetricsMiddleware) ListAvailableActions

func (rmm *RoleManagerMetricsMiddleware) ListAvailableActions(ctx context.Context, session authn.Session) ([]string, error)

func (*RoleManagerMetricsMiddleware) RemoveMemberFromAllRoles

func (rmm *RoleManagerMetricsMiddleware) RemoveMemberFromAllRoles(ctx context.Context, session authn.Session, memberID string) (err error)

func (*RoleManagerMetricsMiddleware) RemoveRole

func (rmm *RoleManagerMetricsMiddleware) RemoveRole(ctx context.Context, session authn.Session, entityID, roleName string) error

func (*RoleManagerMetricsMiddleware) RetrieveAllRoles

func (rmm *RoleManagerMetricsMiddleware) RetrieveAllRoles(ctx context.Context, session authn.Session, entityID string, limit, offset uint64) (roles.RolePage, error)

func (*RoleManagerMetricsMiddleware) RetrieveRole

func (rmm *RoleManagerMetricsMiddleware) RetrieveRole(ctx context.Context, session authn.Session, entityID, roleName string) (roles.Role, error)

func (*RoleManagerMetricsMiddleware) RoleAddActions

func (rmm *RoleManagerMetricsMiddleware) RoleAddActions(ctx context.Context, session authn.Session, entityID, roleName string, actions []string) (caps []string, err error)

func (*RoleManagerMetricsMiddleware) RoleAddMembers

func (rmm *RoleManagerMetricsMiddleware) RoleAddMembers(ctx context.Context, session authn.Session, entityID, roleName string, members []string) ([]string, error)

func (*RoleManagerMetricsMiddleware) RoleCheckActionsExists

func (rmm *RoleManagerMetricsMiddleware) RoleCheckActionsExists(ctx context.Context, session authn.Session, entityID, roleName string, actions []string) (bool, error)

func (*RoleManagerMetricsMiddleware) RoleCheckMembersExists

func (rmm *RoleManagerMetricsMiddleware) RoleCheckMembersExists(ctx context.Context, session authn.Session, entityID, roleName string, members []string) (bool, error)

func (*RoleManagerMetricsMiddleware) RoleListActions

func (rmm *RoleManagerMetricsMiddleware) RoleListActions(ctx context.Context, session authn.Session, entityID, roleName string) ([]string, error)

func (*RoleManagerMetricsMiddleware) RoleListMembers

func (rmm *RoleManagerMetricsMiddleware) RoleListMembers(ctx context.Context, session authn.Session, entityID, roleName string, limit, offset uint64) (roles.MembersPage, error)

func (*RoleManagerMetricsMiddleware) RoleRemoveActions

func (rmm *RoleManagerMetricsMiddleware) RoleRemoveActions(ctx context.Context, session authn.Session, entityID, roleName string, actions []string) (err error)

func (*RoleManagerMetricsMiddleware) RoleRemoveAllActions

func (rmm *RoleManagerMetricsMiddleware) RoleRemoveAllActions(ctx context.Context, session authn.Session, entityID, roleName string) error

func (*RoleManagerMetricsMiddleware) RoleRemoveAllMembers

func (rmm *RoleManagerMetricsMiddleware) RoleRemoveAllMembers(ctx context.Context, session authn.Session, entityID, roleName string) (err error)

func (*RoleManagerMetricsMiddleware) RoleRemoveMembers

func (rmm *RoleManagerMetricsMiddleware) RoleRemoveMembers(ctx context.Context, session authn.Session, entityID, roleName string, members []string) (err error)

func (*RoleManagerMetricsMiddleware) UpdateRoleName

func (rmm *RoleManagerMetricsMiddleware) UpdateRoleName(ctx context.Context, session authn.Session, entityID, oldRoleName, newRoleName string) (roles.Role, error)

Jump to

Keyboard shortcuts

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