docker_client

package
v1.2.35 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 10, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DecE = safe_json.Goccy().Unmarshal
View Source
var EncE = safe_json.Goccy().Marshal

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func New

func New(host, version string) *Client

func (*Client) GetRegistry added in v1.2.35

func (c *Client) GetRegistry() docker_registry.Registry

func (*Client) ImageCreate

func (c *Client) ImageCreate(parentRefStr string) (createResp EventResp, err error)

func (*Client) ImageLoad

func (c *Client) ImageLoad(input io.Reader) (loadResp EventResp, err error)

func (*Client) ImagePull

func (c *Client) ImagePull(refStr string) (pullResp EventResp, err error)

func (*Client) ImagePush

func (c *Client) ImagePush(refStr string) (pushResp EventResp, err error)

func (*Client) RegistryLogin

func (c *Client) RegistryLogin(auth registry.AuthConfig) (authResp registry.AuthenticateOKBody, err error)

func (*Client) WithContext

func (c *Client) WithContext(ctx context.Context) *Client

func (*Client) WithPage

func (c *Client) WithPage(page util.Page) *Client

func (*Client) WithRegistryAuth

func (c *Client) WithRegistryAuth(authConfig registry.AuthConfig) *Client

type EventResp

type EventResp struct {
	Status     int
	Message    []*jsonmessage.JSONMessage
	MessageErr []error // unmarshal Message error
}

func (*EventResp) GetImageCreateResp

func (r *EventResp) GetImageCreateResp() (resp ImageCreateResp)

func (*EventResp) GetImageLoad added in v1.2.35

func (r *EventResp) GetImageLoad() (refStrOrImageID string)

case1: refStr

{
    "stream": "Loaded image: hello-world:latest\n"
}

case2: imageID

{
	"stream": "Loaded image ID: sha256:d2c94e258dcb3c5ac2798d32e1249e42ef01cba4841c2234249495f87264ac5a\n"
}

func (*EventResp) GetImagePullResp

func (r *EventResp) GetImagePullResp() (resp ImagePullResp)

func (*EventResp) GetImagePushResp

func (r *EventResp) GetImagePushResp() (resp ImagePushResp)

func (*EventResp) Parse

func (r *EventResp) Parse(resp *resty.Response) *EventResp

type ImageCreateResp

type ImageCreateResp struct {
	PullFromRefStr  string
	DownLocalRefStr string
	Digest          string
	NotFound        bool
}

type ImagePullResp

type ImagePullResp ImageCreateResp

type ImagePushResp

type ImagePushResp struct {
	RemoteRepository string
	PushID           string
	Aux              struct {
		Tag    string
		Digest string
		Size   int
	}
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL