interactors

package
v0.0.0-...-8c3e621 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2016 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthInter

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

func NewAuthInter

func NewAuthInter(
	policiesInter AuthInterPoliciesInter,
	resourcesInter AuthInterResourcesInter,
	sessionsInter AuthInterSessionsInter,
) *AuthInter

func (*AuthInter) AuthorizeToken

func (i *AuthInter) AuthorizeToken(hostname, path, token string) (bool, *models.Session, error)

func (*AuthInter) GetRedirectURL

func (i *AuthInter) GetRedirectURL(hostname string) (string, error)

type AuthInterPoliciesInter

type AuthInterPoliciesInter interface {
	FindByName(name string) (*models.Policy, error)
}

type AuthInterResourcesInter

type AuthInterResourcesInter interface {
	FindByHostname(hostname string) (*models.Resource, error)
}

type AuthInterSessionsInter

type AuthInterSessionsInter interface {
	FindByToken(id string) (*models.Session, error)
}

type PoliciesInter

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

func (*PoliciesInter) Create

func (i *PoliciesInter) Create(policy *models.Policy) (*models.Policy, error)

func (*PoliciesInter) DeleteByName

func (i *PoliciesInter) DeleteByName(name string) (*models.Policy, error)

func (*PoliciesInter) DeleteCascade

func (i *PoliciesInter) DeleteCascade(resource *models.Resource) error

func (*PoliciesInter) Find

func (i *PoliciesInter) Find() ([]models.Policy, error)

func (*PoliciesInter) FindByName

func (i *PoliciesInter) FindByName(name string) (*models.Policy, error)

func (*PoliciesInter) UpdateByName

func (i *PoliciesInter) UpdateByName(name string, policy *models.Policy) (*models.Policy, error)

type PoliciesInterPoliciesRepo

type PoliciesInterPoliciesRepo interface {
	Update(func(tx *bolt.Tx) error) error
	View(func(tx *bolt.Tx) error) error
}

type PoliciesInterPoliciesValidator

type PoliciesInterPoliciesValidator interface {
	ValidateDeletion(policy *models.Policy) error
}

type PoliciesInterSessionsInter

type PoliciesInterSessionsInter interface {
	DeleteCascade(policy *models.Policy) error
}

type ResourcesInter

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

func (*ResourcesInter) Create

func (i *ResourcesInter) Create(resource *models.Resource) (*models.Resource, error)

func (*ResourcesInter) DeleteByHostname

func (i *ResourcesInter) DeleteByHostname(hostname string) (*models.Resource, error)

func (*ResourcesInter) Find

func (i *ResourcesInter) Find() ([]models.Resource, error)

func (*ResourcesInter) FindByHostname

func (i *ResourcesInter) FindByHostname(hostname string) (*models.Resource, error)

func (*ResourcesInter) UpdateByHostname

func (i *ResourcesInter) UpdateByHostname(hostname string, resource *models.Resource) (*models.Resource, error)

type ResourcesInterPoliciesInter

type ResourcesInterPoliciesInter interface {
	DeleteCascade(resource *models.Resource) error
}

type ResourcesInterResourcesRepo

type ResourcesInterResourcesRepo interface {
	Update(func(tx *bolt.Tx) error) error
	View(func(tx *bolt.Tx) error) error
}

type SessionOptionsGetter

type SessionOptionsGetter interface {
	GetSessionValidity() time.Duration
	GetSessionTokenLength() int
}

type SessionsInter

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

func (*SessionsInter) Create

func (i *SessionsInter) Create(session *models.Session) (*models.Session, error)

func (*SessionsInter) DeleteByOwnerTokens

func (i *SessionsInter) DeleteByOwnerTokens(ownerTokens []string) ([]models.Session, error)

func (*SessionsInter) DeleteByToken

func (i *SessionsInter) DeleteByToken(token string) (*models.Session, error)

func (*SessionsInter) DeleteCascade

func (i *SessionsInter) DeleteCascade(policy *models.Policy) error

func (*SessionsInter) Find

func (i *SessionsInter) Find() ([]models.Session, error)

func (*SessionsInter) FindByToken

func (i *SessionsInter) FindByToken(token string) (*models.Session, error)

type SessionsInterSessionsRepo

type SessionsInterSessionsRepo interface {
	Update(func(tx *bolt.Tx) error) error
	View(func(tx *bolt.Tx) error) error
}

Jump to

Keyboard shortcuts

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