@@ -8,17 +8,17 @@ import (
88
99 "github.com/containers/podman/v4/pkg/api/handlers"
1010 "github.com/containers/podman/v4/pkg/bindings"
11- "github.com/containers/podman/v4/pkg/domain/entities"
11+ entitiesTypes "github.com/containers/podman/v4/pkg/domain/entities/types "
1212 "github.com/containers/podman/v4/pkg/errorhandling"
1313 jsoniter "github.com/json-iterator/go"
1414)
1515
16- func CreatePodFromSpec (ctx context.Context , spec * entities .PodSpec ) (* entities .PodCreateReport , error ) {
16+ func CreatePodFromSpec (ctx context.Context , spec * entitiesTypes .PodSpec ) (* entitiesTypes .PodCreateReport , error ) {
1717 var (
18- pcr entities .PodCreateReport
18+ pcr entitiesTypes .PodCreateReport
1919 )
2020 if spec == nil {
21- spec = new (entities .PodSpec )
21+ spec = new (entitiesTypes .PodSpec )
2222 }
2323 conn , err := bindings .GetClient (ctx )
2424 if err != nil {
@@ -54,9 +54,9 @@ func Exists(ctx context.Context, nameOrID string, options *ExistsOptions) (bool,
5454}
5555
5656// Inspect returns low-level information about the given pod.
57- func Inspect (ctx context.Context , nameOrID string , options * InspectOptions ) (* entities .PodInspectReport , error ) {
57+ func Inspect (ctx context.Context , nameOrID string , options * InspectOptions ) (* entitiesTypes .PodInspectReport , error ) {
5858 var (
59- report entities .PodInspectReport
59+ report entitiesTypes .PodInspectReport
6060 )
6161 if options == nil {
6262 options = new (InspectOptions )
@@ -77,9 +77,9 @@ func Inspect(ctx context.Context, nameOrID string, options *InspectOptions) (*en
7777
7878// Kill sends a SIGTERM to all the containers in a pod. The optional signal parameter
7979// can be used to override SIGTERM.
80- func Kill (ctx context.Context , nameOrID string , options * KillOptions ) (* entities .PodKillReport , error ) {
80+ func Kill (ctx context.Context , nameOrID string , options * KillOptions ) (* entitiesTypes .PodKillReport , error ) {
8181 var (
82- report entities .PodKillReport
82+ report entitiesTypes .PodKillReport
8383 )
8484 if options == nil {
8585 options = new (KillOptions )
@@ -102,8 +102,8 @@ func Kill(ctx context.Context, nameOrID string, options *KillOptions) (*entities
102102}
103103
104104// Pause pauses all running containers in a given pod.
105- func Pause (ctx context.Context , nameOrID string , options * PauseOptions ) (* entities .PodPauseReport , error ) {
106- var report entities .PodPauseReport
105+ func Pause (ctx context.Context , nameOrID string , options * PauseOptions ) (* entitiesTypes .PodPauseReport , error ) {
106+ var report entitiesTypes .PodPauseReport
107107 if options == nil {
108108 options = new (PauseOptions )
109109 }
@@ -123,8 +123,8 @@ func Pause(ctx context.Context, nameOrID string, options *PauseOptions) (*entiti
123123
124124// Prune by default removes all non-running pods in local storage.
125125// And with force set true removes all pods.
126- func Prune (ctx context.Context , options * PruneOptions ) ([]* entities .PodPruneReport , error ) {
127- var reports []* entities .PodPruneReport
126+ func Prune (ctx context.Context , options * PruneOptions ) ([]* entitiesTypes .PodPruneReport , error ) {
127+ var reports []* entitiesTypes .PodPruneReport
128128 if options == nil {
129129 options = new (PruneOptions )
130130 }
@@ -144,9 +144,9 @@ func Prune(ctx context.Context, options *PruneOptions) ([]*entities.PodPruneRepo
144144
145145// List returns all pods in local storage. The optional filters parameter can
146146// be used to refine which pods should be listed.
147- func List (ctx context.Context , options * ListOptions ) ([]* entities .ListPodsReport , error ) {
147+ func List (ctx context.Context , options * ListOptions ) ([]* entitiesTypes .ListPodsReport , error ) {
148148 var (
149- podsReports []* entities .ListPodsReport
149+ podsReports []* entitiesTypes .ListPodsReport
150150 )
151151 if options == nil {
152152 options = new (ListOptions )
@@ -169,8 +169,8 @@ func List(ctx context.Context, options *ListOptions) ([]*entities.ListPodsReport
169169}
170170
171171// Restart restarts all containers in a pod.
172- func Restart (ctx context.Context , nameOrID string , options * RestartOptions ) (* entities .PodRestartReport , error ) {
173- var report entities .PodRestartReport
172+ func Restart (ctx context.Context , nameOrID string , options * RestartOptions ) (* entitiesTypes .PodRestartReport , error ) {
173+ var report entitiesTypes .PodRestartReport
174174 if options == nil {
175175 options = new (RestartOptions )
176176 }
@@ -190,8 +190,8 @@ func Restart(ctx context.Context, nameOrID string, options *RestartOptions) (*en
190190
191191// Remove deletes a Pod from local storage. The optional force parameter denotes
192192// that the Pod can be removed even if in a running state.
193- func Remove (ctx context.Context , nameOrID string , options * RemoveOptions ) (* entities .PodRmReport , error ) {
194- var report entities .PodRmReport
193+ func Remove (ctx context.Context , nameOrID string , options * RemoveOptions ) (* entitiesTypes .PodRmReport , error ) {
194+ var report entitiesTypes .PodRmReport
195195 if options == nil {
196196 options = new (RemoveOptions )
197197 }
@@ -213,8 +213,8 @@ func Remove(ctx context.Context, nameOrID string, options *RemoveOptions) (*enti
213213}
214214
215215// Start starts all containers in a pod.
216- func Start (ctx context.Context , nameOrID string , options * StartOptions ) (* entities .PodStartReport , error ) {
217- var report entities .PodStartReport
216+ func Start (ctx context.Context , nameOrID string , options * StartOptions ) (* entitiesTypes .PodStartReport , error ) {
217+ var report entitiesTypes .PodStartReport
218218 if options == nil {
219219 options = new (StartOptions )
220220 }
@@ -239,8 +239,8 @@ func Start(ctx context.Context, nameOrID string, options *StartOptions) (*entiti
239239
240240// Stop stops all containers in a Pod. The optional timeout parameter can be
241241// used to override the timeout before the container is killed.
242- func Stop (ctx context.Context , nameOrID string , options * StopOptions ) (* entities .PodStopReport , error ) {
243- var report entities .PodStopReport
242+ func Stop (ctx context.Context , nameOrID string , options * StopOptions ) (* entitiesTypes .PodStopReport , error ) {
243+ var report entitiesTypes .PodStopReport
244244 if options == nil {
245245 options = new (StopOptions )
246246 }
@@ -302,12 +302,12 @@ func Top(ctx context.Context, nameOrID string, options *TopOptions) ([]string, e
302302}
303303
304304// Unpause unpauses all paused containers in a Pod.
305- func Unpause (ctx context.Context , nameOrID string , options * UnpauseOptions ) (* entities .PodUnpauseReport , error ) {
305+ func Unpause (ctx context.Context , nameOrID string , options * UnpauseOptions ) (* entitiesTypes .PodUnpauseReport , error ) {
306306 if options == nil {
307307 options = new (UnpauseOptions )
308308 }
309309 _ = options
310- var report entities .PodUnpauseReport
310+ var report entitiesTypes .PodUnpauseReport
311311 conn , err := bindings .GetClient (ctx )
312312 if err != nil {
313313 return nil , err
@@ -322,7 +322,7 @@ func Unpause(ctx context.Context, nameOrID string, options *UnpauseOptions) (*en
322322}
323323
324324// Stats display resource-usage statistics of one or more pods.
325- func Stats (ctx context.Context , namesOrIDs []string , options * StatsOptions ) ([]* entities .PodStatsReport , error ) {
325+ func Stats (ctx context.Context , namesOrIDs []string , options * StatsOptions ) ([]* entitiesTypes .PodStatsReport , error ) {
326326 if options == nil {
327327 options = new (StatsOptions )
328328 }
@@ -338,7 +338,7 @@ func Stats(ctx context.Context, namesOrIDs []string, options *StatsOptions) ([]*
338338 params .Add ("namesOrIDs" , i )
339339 }
340340
341- var reports []* entities .PodStatsReport
341+ var reports []* entitiesTypes .PodStatsReport
342342 response , err := conn .DoRequest (ctx , nil , http .MethodGet , "/pods/stats" , params , nil )
343343 if err != nil {
344344 return nil , err
0 commit comments