Documentation ¶
Index ¶
- Constants
- type Repository
- func (r *Repository) Count(ctx context.Context, query string) (int, error)
- func (r *Repository) Create(ctx context.Context, variableSet VariableSet) (VariableSet, error)
- func (r *Repository) Delete(ctx context.Context, id id.ID) error
- func (r *Repository) Exists(ctx context.Context, id id.ID) (bool, error)
- func (r *Repository) Get(ctx context.Context, id id.ID) (VariableSet, error)
- func (r *Repository) List(ctx context.Context, take, skip int, query, sortBy, sortDirection string) ([]VariableSet, error)
- func (r *Repository) Provision(ctx context.Context, variableSet VariableSet) error
- func (r *Repository) SetID(variableSet VariableSet, id id.ID) VariableSet
- func (*Repository) SortingFields() []string
- func (r *Repository) Update(ctx context.Context, variableSet VariableSet) (VariableSet, error)
- type VariableSet
- type VariableSetValue
Constants ¶
View Source
const ( ResourceName = "VariableSet" ResourceNamePlural = "VariableSets" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Repository ¶
type Repository struct {
// contains filtered or unexported fields
}
func NewRepository ¶
func NewRepository(db *sql.DB) *Repository
func (*Repository) Create ¶
func (r *Repository) Create(ctx context.Context, variableSet VariableSet) (VariableSet, error)
func (*Repository) Get ¶
func (r *Repository) Get(ctx context.Context, id id.ID) (VariableSet, error)
func (*Repository) List ¶
func (r *Repository) List(ctx context.Context, take, skip int, query, sortBy, sortDirection string) ([]VariableSet, error)
func (*Repository) Provision ¶
func (r *Repository) Provision(ctx context.Context, variableSet VariableSet) error
func (*Repository) SetID ¶
func (r *Repository) SetID(variableSet VariableSet, id id.ID) VariableSet
func (*Repository) SortingFields ¶
func (*Repository) SortingFields() []string
func (*Repository) Update ¶
func (r *Repository) Update(ctx context.Context, variableSet VariableSet) (VariableSet, error)
type VariableSet ¶
type VariableSet struct { ID id.ID `json:"id"` Name string `json:"name"` Description string `json:"description"` CreatedAt string `json:"createdAt"` Values []VariableSetValue `json:"values"` }
func (VariableSet) Get ¶
func (e VariableSet) Get(key string) string
func (VariableSet) GetID ¶
func (e VariableSet) GetID() id.ID
func (VariableSet) HasID ¶
func (e VariableSet) HasID() bool
func (VariableSet) Merge ¶
func (e VariableSet) Merge(env VariableSet) VariableSet
func (VariableSet) Slug ¶
func (e VariableSet) Slug() id.ID
func (VariableSet) Validate ¶
func (e VariableSet) Validate() error
type VariableSetValue ¶
Click to show internal directories.
Click to hide internal directories.