github.com/david-imola/snapd@v0.0.0-20210611180407-2de8ddeece6d/overlord/snapstate/policy/export_test.go (about)

     1  package policy
     2  
     3  func NewAppPolicy() appPolicy                    { return appPolicy{} }
     4  func NewBasePolicy(m string) *basePolicy         { return &basePolicy{modelBase: m} }
     5  func NewGadgetPolicy(m string) *gadgetPolicy     { return &gadgetPolicy{modelGadget: m} }
     6  func NewKernelPolicy(m string) *kernelPolicy     { return &kernelPolicy{modelKernel: m} }
     7  func NewOSPolicy(m string) *osPolicy             { return &osPolicy{modelBase: m} }
     8  func NewSnapdPolicy(onClassic bool) *snapdPolicy { return &snapdPolicy{onClassic: onClassic} }
     9  
    10  var (
    11  	ErrNoName       = errNoName
    12  	ErrInUseForBoot = errInUseForBoot
    13  	ErrRequired     = errRequired
    14  	ErrIsModel      = errIsModel
    15  
    16  	ErrSnapdNotRemovableOnCore       = errSnapdNotRemovableOnCore
    17  	ErrSnapdNotYetRemovableOnClassic = errSnapdNotYetRemovableOnClassic
    18  
    19  	ErrEphemeralSnapsNotRemovalable = errEphemeralSnapsNotRemovalable
    20  )
    21  
    22  func InUseByErr(snaps ...string) error {
    23  	return inUseByErr(snaps)
    24  }