credsutil

package
v0.7.2 Latest Latest
Warning

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

Go to latest
Published: May 8, 2017 License: MPL-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CassandraCredentialsProducer

type CassandraCredentialsProducer struct{}

CassandraCredentialsProducer implements CredentialsProducer and provides an interface for cassandra databases to generate user information.

func (*CassandraCredentialsProducer) GenerateExpiration

func (ccp *CassandraCredentialsProducer) GenerateExpiration(ttl time.Time) (string, error)

func (*CassandraCredentialsProducer) GeneratePassword

func (ccp *CassandraCredentialsProducer) GeneratePassword() (string, error)

func (*CassandraCredentialsProducer) GenerateUsername

func (ccp *CassandraCredentialsProducer) GenerateUsername(displayName string) (string, error)

type CredentialsProducer

type CredentialsProducer interface {
	GenerateUsername(displayName string) (string, error)
	GeneratePassword() (string, error)
	GenerateExpiration(ttl time.Time) (string, error)
}

CredentialsProducer can be used as an embeded interface in the Database definition. It implements the methods for generating user information for a particular database type and is used in all the builtin database types.

type SQLCredentialsProducer

type SQLCredentialsProducer struct {
	DisplayNameLen int
	UsernameLen    int
}

SQLCredentialsProducer implements CredentialsProducer and provides a generic credentials producer for most sql database types.

func (*SQLCredentialsProducer) GenerateExpiration

func (scp *SQLCredentialsProducer) GenerateExpiration(ttl time.Time) (string, error)

func (*SQLCredentialsProducer) GeneratePassword

func (scp *SQLCredentialsProducer) GeneratePassword() (string, error)

func (*SQLCredentialsProducer) GenerateUsername

func (scp *SQLCredentialsProducer) GenerateUsername(displayName string) (string, error)

Jump to

Keyboard shortcuts

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