github.com/altoros/juju-vmware@v0.0.0-20150312064031-f19ae857ccca/apiserver/charms/state.go (about) 1 // Copyright 2015 Canonical Ltd. 2 // Licensed under the AGPLv3, see LICENCE file for details. 3 4 package charms 5 6 import ( 7 "github.com/juju/juju/state" 8 "gopkg.in/juju/charm.v4" 9 ) 10 11 type charmsAccess interface { 12 Charm(curl *charm.URL) (*state.Charm, error) 13 AllCharms() ([]*state.Charm, error) 14 } 15 16 type stateShim struct { 17 state *state.State 18 } 19 20 func (s stateShim) Charm(curl *charm.URL) (*state.Charm, error) { 21 return s.state.Charm(curl) 22 } 23 24 func (s stateShim) AllCharms() ([]*state.Charm, error) { 25 return s.state.AllCharms() 26 }