github.com/juju/juju@v0.0.0-20240430160146-1752b71fcf00/cmd/modelcmd/export_test.go (about) 1 // Copyright 2015 Canonical Ltd. 2 // Licensed under the AGPLv3, see LICENCE file for details. 3 4 package modelcmd 5 6 import ( 7 "github.com/go-macaroon-bakery/macaroon-bakery/v3/httpbakery" 8 "github.com/juju/cmd/v3" 9 10 "github.com/juju/juju/jujuclient" 11 ) 12 13 var ( 14 NewAPIContext = newAPIContext 15 ProcessAccountDetails = processAccountDetails 16 ) 17 18 func Interactor(ctx *apiContext) httpbakery.Interactor { 19 return ctx.interactor 20 } 21 22 func SetRunStarted(b interface { 23 setRunStarted() 24 }) { 25 b.setRunStarted() 26 } 27 28 func InitContexts(c *cmd.Context, b interface { 29 initContexts(*cmd.Context) 30 }) { 31 b.initContexts(c) 32 } 33 34 func SetModelRefresh(refresh func(jujuclient.ClientStore, string) error, b interface { 35 SetModelRefresh(refresh func(jujuclient.ClientStore, string) error) 36 }) { 37 b.SetModelRefresh(refresh) 38 }