docker_client

package
v1.2.47 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecE

func DecE(b []byte, v any) error

func EncE

func EncE(v any) ([]byte, error)

Types

type APIClient added in v1.2.41

type APIClient interface {
	EventAPIClient
}

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) ImageBuild added in v1.2.40

func (c *Client) ImageBuild(input io.Reader, buildOptions types.ImageBuildOptions, ctx ...context.Context) (
	buildResp EventResp, err error)

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 EventAPIClient added in v1.2.41

type EventAPIClient interface {
	ImageAPIClient
}

type EventResp

type EventResp struct {
	Status int

	// Status is 200, Message is not null
	Message       []*jsonmessage.JSONMessage
	MessageDecErr []error // unmarshal Message error

	// Status is not 200, ErrMessage is not null
	ErrMessage       []*jsonmessage.JSONError
	ErrMessageDecErr []error // unmarshal ErrMessage error
}

func (*EventResp) Err added in v1.2.41

func (r *EventResp) Err() error

func (*EventResp) Error added in v1.2.41

func (r *EventResp) Error() string

func (*EventResp) GetImageBuildResp added in v1.2.36

func (r *EventResp) GetImageBuildResp() (resp ImageBuildResp)

func (*EventResp) GetImageCreateResp

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

func (*EventResp) GetImageLoad added in v1.2.35

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

func (*EventResp) GetImagePullResp

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

func (*EventResp) GetImagePushResp

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

func (*EventResp) HasError added in v1.2.41

func (r *EventResp) HasError() bool

func (*EventResp) Parse

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

func (*EventResp) ParseBytes added in v1.2.36

func (r *EventResp) ParseBytes(bs []byte) *EventResp

func (*EventResp) WrapParse added in v1.2.41

func (r *EventResp) WrapParse(resp *resty.Response, err error) (EventResp, error)

type ImageAPIClient added in v1.2.41

type ImageAPIClient interface {
	ImageLoad(input io.Reader) (EventResp, error)
	ImagePush(refStr string) (EventResp, error)
	ImageCreate(parentRefStr string) (EventResp, error)
	ImagePull(refStr string) (EventResp, error)
	ImageBuild(input io.Reader, options types.ImageBuildOptions, ctx ...context.Context) (EventResp, error)
}

type ImageBuildResp added in v1.2.36

type ImageBuildResp struct {
	Streams  []string `json:"image_build_info"`
	Sha256ID string   `json:"image_sha256_id"`
}

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