Documentation ¶
Index ¶
- func Auth(user string, pwd string) auth
- func NewConnection(s server, a auth) (driver.Conn, error)
- func Opts(prefix string) *opts
- func Server(host string, port int16, db string) server
- type DAO
- func (p *DAO) Close() error
- func (p *DAO) DeleteOwnerHostname(hostname, username string) error
- func (p *DAO) GetSubscription(id string) (*types.SubscriptionWithHostname, error)
- func (p *DAO) GetSubscriptions() (map[string]*types.SubscriptionWithHostname, error)
- func (p *DAO) InsertOwnerHostname(item types.OwnerHostname) error
- func (p *DAO) Save(rumEvent beacon.RumEvent) error
- func (p *DAO) SaveHost(event beacon.HostnameEvent) error
- type IDAO
- type MigrationDAO
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewConnection ¶ added in v0.0.3
New Clickhouse connection nolint: revive
Types ¶
type DAO ¶
type DAO struct {
// contains filtered or unexported fields
}
DAO is data access object for clickhouse database
func New ¶
func New(conn clickhouse.Conn, opts *opts) *DAO
New creates persistance service nolint: revive
func (*DAO) DeleteOwnerHostname ¶ added in v0.0.3
DeleteOwnerHostname deletes the hostname
func (*DAO) GetSubscription ¶ added in v0.0.3
func (p *DAO) GetSubscription(id string) (*types.SubscriptionWithHostname, error)
GetSubscription gets subscription by id
func (*DAO) GetSubscriptions ¶ added in v0.0.3
func (p *DAO) GetSubscriptions() (map[string]*types.SubscriptionWithHostname, error)
GetSubscriptions gets all subscriptions
func (*DAO) InsertOwnerHostname ¶ added in v0.0.3
func (p *DAO) InsertOwnerHostname(item types.OwnerHostname) error
InsertOwnerHostname inserts a new hostname
type IDAO ¶ added in v0.0.3
type IDAO interface { Close() error Save(rumEvent beacon.RumEvent) error SaveHost(event beacon.HostnameEvent) error InsertOwnerHostname(item types.OwnerHostname) error DeleteOwnerHostname(hostname, username string) error GetSubscriptions() (map[string]*types.SubscriptionWithHostname, error) GetSubscription(id string) (*types.SubscriptionWithHostname, error) }
IDAO is data access object inteface
type MigrationDAO ¶ added in v0.0.3
type MigrationDAO struct {
// contains filtered or unexported fields
}
MigrationDAO is data access object for clickhouse database
func NewMigrationDAO ¶ added in v0.0.3
func NewMigrationDAO(s server, a auth, opts *opts) *MigrationDAO
New creates persistance service nolint: revive
func (*MigrationDAO) Migrate ¶ added in v0.0.3
func (p *MigrationDAO) Migrate() error
Migrate applies all pending database migrations
Click to show internal directories.
Click to hide internal directories.