blob: 5ef30d99bf6b1d0d65e54321810cd5ae6a603348 [file] [log] [blame]
// Package repository contains implementation of the interface for
// storing and serving various veyron management objects.
package repository
import (
"veyron/services/mgmt/profile"
"veyron2/security"
"veyron2/services/mgmt/application"
public "veyron2/services/mgmt/repository"
)
// Application describes an application repository internally. Besides
// the public Application interface, it allows to add and remove
// application envelopes.
type Application interface {
public.Application
// Put adds the given tuple of application version (specified
// through the veyron name suffix) and application envelope to all
// of the given application profiles.
Put(Profiles []string, Envelope application.Envelope) error {security.WriteLabel}
// Remove removes the application envelope for the given profile
// name and application version (specified through the veyron name
// suffix). If no version is specified as part of the suffix, the
// method removes all versions for the given profile.
//
// TODO(jsimsa): Add support for using "*" to specify all profiles
// when Matt implements Globing (or Ken implements querying).
Remove(Profile string) error {security.WriteLabel}
}
// Profile describes a profile internally. Besides the public Profile
// interface, it allows to add and remove profile specifications.
type Profile interface {
public.Profile
// Specification returns the profile specification for the profile
// identified through the veyron name suffix.
Specification() (profile.Specification, error) {security.ReadLabel}
// Put sets the profile specification for the profile identified
// through the veyron name suffix.
Put(Specification profile.Specification) error {security.WriteLabel}
// Remove removes the profile specification for the profile
// identified through the veyron name suffix.
Remove() error {security.WriteLabel}
}