github.com/wallyworld/juju@v0.0.0-20161013125918-6cf1bc9d917a/apiserver/hostkeyreporter/shim.go (about) 1 // Copyright 2016 Canonical Ltd. 2 // Licensed under the LGPLv3, see LICENCE file for details. 3 4 package hostkeyreporter 5 6 import ( 7 "github.com/juju/errors" 8 "github.com/juju/juju/apiserver/facade" 9 "github.com/juju/juju/state" 10 ) 11 12 // newFacade wraps New to express the supplied *state.State as a Backend. 13 func newFacade(st *state.State, res facade.Resources, auth facade.Authorizer) (*Facade, error) { 14 facade, err := New(st, res, auth) 15 if err != nil { 16 return nil, errors.Trace(err) 17 } 18 return facade, nil 19 }