Documentation ¶
Overview ¶
package config implements ts-config-service from the train ticket application
Index ¶
- type Config
- type ConfigService
- type ConfigServiceImpl
- func (c *ConfigServiceImpl) Create(ctx context.Context, conf Config) error
- func (c *ConfigServiceImpl) Delete(ctx context.Context, name string) error
- func (c *ConfigServiceImpl) Find(ctx context.Context, name string) (Config, error)
- func (c *ConfigServiceImpl) FindAll(ctx context.Context) ([]Config, error)
- func (c *ConfigServiceImpl) Update(ctx context.Context, conf Config) (bool, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConfigService ¶
type ConfigService interface { // Creates a new config variable Create(ctx context.Context, conf Config) error // Updates an existing `conf` config variable Update(ctx context.Context, conf Config) (bool, error) // Find a config variable using its `name` Find(ctx context.Context, name string) (Config, error) // Deletes an existing config variable using its `name` Delete(ctx context.Context, name string) error // Find all config variables FindAll(ctx context.Context) ([]Config, error) }
Config Service manages Config variables in the application
type ConfigServiceImpl ¶
type ConfigServiceImpl struct {
// contains filtered or unexported fields
}
Implementation of Config Service
func NewConfigServiceImpl ¶
func NewConfigServiceImpl(ctx context.Context, db backend.NoSQLDatabase) (*ConfigServiceImpl, error)
Creates a new ConfigService object
func (*ConfigServiceImpl) Create ¶
func (c *ConfigServiceImpl) Create(ctx context.Context, conf Config) error
func (*ConfigServiceImpl) Delete ¶
func (c *ConfigServiceImpl) Delete(ctx context.Context, name string) error
Click to show internal directories.
Click to hide internal directories.