Documentation ¶
Index ¶
- func BuildDataSourceName(url, database, usernameFile, passwordFile string) (string, error)
- type Iterator
- type MySQL
- func (m *MySQL) Close() error
- func (m *MySQL) Create(ctx context.Context, col datastore.Collection, id string, entity interface{}) error
- func (m *MySQL) Find(ctx context.Context, col datastore.Collection, opts datastore.ListOptions) (datastore.Iterator, error)
- func (m *MySQL) Get(ctx context.Context, col datastore.Collection, id string, v interface{}) error
- func (m *MySQL) Ping() error
- func (m *MySQL) Update(ctx context.Context, col datastore.Collection, id string, ...) error
- type Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildDataSourceName ¶
BuildDataSourceName returns source name to make connection to database.
Types ¶
type Iterator ¶
type Iterator struct {
// contains filtered or unexported fields
}
Iterator for MySQL result set
type MySQL ¶
type MySQL struct {
// contains filtered or unexported fields
}
MySQL client wrapper
func (*MySQL) Create ¶
func (m *MySQL) Create(ctx context.Context, col datastore.Collection, id string, entity interface{}) error
Create implementation for MySQL
func (*MySQL) Find ¶
func (m *MySQL) Find(ctx context.Context, col datastore.Collection, opts datastore.ListOptions) (datastore.Iterator, error)
Find implementation for MySQL
type Option ¶
type Option func(*MySQL)
Option for create MySQL typed instance
func WithAuthenticationFile ¶
WithAuthenticationFile returns auth info setup function
func WithLogger ¶
WithLogger returns logger setup function
Click to show internal directories.
Click to hide internal directories.