permhandler

package
v0.0.0-...-b2cdabd Latest Latest
Warning

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

Go to latest
Published: Feb 29, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler struct {
	sync.Mutex
	// contains filtered or unexported fields
}

Handler update handler.

func New

func New() (handler *Handler, err error)

New returns pointer to new Handler.

func (*Handler) GetPermissions

func (handler *Handler) GetPermissions(
	secret, funcServerID string,
) (instance aostypes.InstanceIdent, permissions map[string]string, err error)

GetPermissions returns instance and permissions by secret and functional server ID.

func (*Handler) RegisterInstance

func (handler *Handler) RegisterInstance(
	instance aostypes.InstanceIdent, permissions map[string]map[string]string,
) (secret string, err error)

RegisterInstance adds new service instance into cache and creates secret.

func (*Handler) UnregisterInstance

func (handler *Handler) UnregisterInstance(instance aostypes.InstanceIdent)

UnregisterInstance deletes service instance with permissions from cache.

Jump to

Keyboard shortcuts

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