charond

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2016 License: Apache-2.0 Imports: 37 Imported by: 0

Documentation

Overview

Package charond ...

Index

Constants

View Source
const (
	// EnvironmentProduction ...
	EnvironmentProduction = "prod"
	// EnvironmentTest ...
	EnvironmentTest = "test"
)
View Source
const (
	// MonitoringEnginePrometheus ...
	MonitoringEnginePrometheus = "prometheus"
)
View Source
const (
	// UserConfirmationTokenUsed is a value that is used when confirmation token was already used.
	UserConfirmationTokenUsed = "!"
)

Variables

This section is empty.

Functions

func ScanGroupPermissionsRows

func ScanGroupPermissionsRows(rows *sql.Rows) ([]*groupPermissionsEntity, error)

func ScanGroupRows

func ScanGroupRows(rows *sql.Rows) ([]*groupEntity, error)

func ScanPermissionRows

func ScanPermissionRows(rows *sql.Rows) ([]*permissionEntity, error)

func ScanUserGroupsRows

func ScanUserGroupsRows(rows *sql.Rows) ([]*userGroupsEntity, error)

func ScanUserPermissionsRows

func ScanUserPermissionsRows(rows *sql.Rows) ([]*userPermissionsEntity, error)

func ScanUserRows

func ScanUserRows(rows *sql.Rows) ([]*userEntity, error)

func TestDaemon

func TestDaemon(t *testing.T, opts TestDaemonOpts) (net.Addr, io.Closer)

TestDaemon returns address of fully started in-memory daemon and closer to close it.

Types

type Daemon

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

Daemon ...

func NewDaemon

func NewDaemon(opts *DaemonOpts) *Daemon

NewDaemon ...

func (*Daemon) Addr

func (d *Daemon) Addr() net.Addr

Addr returns net.Addr that rpc service is listening on.

func (*Daemon) Close

func (d *Daemon) Close() (err error)

Close implements io.Closer interface.

func (*Daemon) Run

func (d *Daemon) Run() (err error)

Run ...

type DaemonOpts

type DaemonOpts struct {
	Environment        string
	Namespace          string
	Subsystem          string
	MonitoringEngine   string
	TLS                bool
	TLSCertFile        string
	TLSKeyFile         string
	PostgresAddress    string
	PasswordBCryptCost int
	MnemosyneAddress   string
	Logger             log.Logger
	RPCListener        net.Listener
	DebugListener      net.Listener
}

DaemonOpts ...

type PermissionRegistry

type PermissionRegistry interface {
	// Exists returns true if given charon.Permission was already registered.
	Exists(permission charon.Permission) (exists bool)
	// Register checks if given collection is valid and
	// calls charon.PermissionRepository to store provided permissions
	// in persistent way.
	Register(permissions charon.Permissions) (created, untouched, removed int64, err error)
}

charon.PermissionRegistry is an interface that describes in memory storage that holds information about permissions that was registered by 3rd party services. Should be only used as a proxy for registration process to avoid multiple sql hits.

type TestDaemonOpts

type TestDaemonOpts struct {
	MnemosyneAddress string
	PostgresAddress  string
}

Jump to

Keyboard shortcuts

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