github.com/wallyworld/juju@v0.0.0-20161013125918-6cf1bc9d917a/apiserver/facade/facadetest/context.go (about) 1 // Copyright 2016 Canonical Ltd. 2 // Licensed under the AGPLv3, see LICENCE file for details. 3 4 package facadetest 5 6 import ( 7 "github.com/juju/juju/apiserver/facade" 8 "github.com/juju/juju/state" 9 ) 10 11 // Context implements facade.Context in the simplest possible way. 12 type Context struct { 13 Abort_ <-chan struct{} 14 Auth_ facade.Authorizer 15 Resources_ facade.Resources 16 State_ *state.State 17 ID_ string 18 } 19 20 // Abort is part of the facade.Context interface. 21 func (context Context) Abort() <-chan struct{} { 22 return context.Abort_ 23 } 24 25 // Auth is part of the facade.Context interface. 26 func (context Context) Auth() facade.Authorizer { 27 return context.Auth_ 28 } 29 30 // Resources is part of the facade.Context interface. 31 func (context Context) Resources() facade.Resources { 32 return context.Resources_ 33 } 34 35 // State is part of the facade.Context interface. 36 func (context Context) State() *state.State { 37 return context.State_ 38 } 39 40 // ID is part of the facade.Context interface. 41 func (context Context) ID() string { 42 return context.ID_ 43 }