accepta

command module
v0.0.0-...-193a162 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2018 License: MIT Imports: 7 Imported by: 0

README

GoDoc license

  • Accepta is a smart API client for "Docker", implemented by golang.
  • We can use this to newer API version(eg. 1.36) with swagger code gen.

What is this :

  • this is an API client for Docker.

How to Install :

go get github.com/airking05/go-docker-api-client

How to Use :

package readme

import (
	cli "github.com/airking05/go-docker-api-client"
	"github.com/airking05/go-docker-api-client/client/container"
	"context"
	"fmt"
	)

func main() {
	client := cli.NewDefault()
	
	// Container List
    containerList,err := client.ListContainers(container.NewContainerListParamsWithContext(context.Background()))
    
    if err != nil {
    	panic(err)
    }
    
    for _,c := range containerList {
   	    fmt.Println(c.ID)
		fmt.Println(c.Status)
		fmt.Println(c.Command)
    }}
    

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

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