Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( //PackageName package name Package = "cadmus" // Version release version Version = "0.1.0" // Build will be overwritten automatically by the build system Build = "dev" // GitCommit will be overwritten automatically by the build system GitCommit = "HEAD" )
Functions ¶
Types ¶
type Channel ¶
type Channel struct { ID int `storm:"id,increment"` Name string `storm:"index"` CreatedAt time.Time `storm:"index"` }
func NewChannel ¶
type ChannelLoggerMap ¶
ChannelLoggerMap holds a mapping of channels to Logger interfaces that is safe for concurrent readers and writers.
func NewChannelLoggerMap ¶
func NewChannelLoggerMap() *ChannelLoggerMap
NewChannelLoggerMap returns a new initialized *ChannelLoggerMap
func (*ChannelLoggerMap) Add ¶
func (c *ChannelLoggerMap) Add(logger Logger) error
Add adds a new *Channel if not already exists or an error otherwise
func (*ChannelLoggerMap) Count ¶
func (c *ChannelLoggerMap) Count() int
Count returns the number of Logger(s)
func (*ChannelLoggerMap) Get ¶
func (c *ChannelLoggerMap) Get(channel string) Logger
Get returns a Logger given a channel if it exists or a zero-value Logger
type FileLogger ¶
func NewFileLogger ¶
func NewFileLogger(logdir, network, channel string) (*FileLogger, error)
func (*FileLogger) Channel ¶
func (l *FileLogger) Channel() string
func (*FileLogger) Log ¶
func (l *FileLogger) Log(message string) error
func (*FileLogger) LogMessage ¶
func (l *FileLogger) LogMessage(user, message string) error
func (*FileLogger) Logf ¶
func (l *FileLogger) Logf(format string, args ...interface{}) error
func (*FileLogger) Network ¶
func (l *FileLogger) Network() string
func (*FileLogger) Rotate ¶
func (l *FileLogger) Rotate() error
Click to show internal directories.
Click to hide internal directories.