22 lines
452 B
Go
22 lines
452 B
Go
package main
|
|
|
|
import (
|
|
"context"
|
|
"time"
|
|
|
|
"mstore/pkg/client"
|
|
)
|
|
|
|
func (util *ImageUtil) imageInfo(params *ImageInfoParams) (*ImageInfoResult, error) {
|
|
var err error
|
|
res := &ImageInfoResult{}
|
|
ctx := context.Background()
|
|
|
|
cli := client.NewClientWithAuth(params.Username, params.Password)
|
|
timeout := time.Duration(params.Timeout) * time.Second
|
|
opres, err := cli.ImageInfo(ctx, params.Imagepath, timeout)
|
|
|
|
res.ImageInfo = opres
|
|
return res, err
|
|
}
|