network/

directory
v0.4.18 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2021 License: MPL-2.0

Directories

Path Synopsis
v1
availablenetworks
Package network contains functionality for working GCLoud networks API resources Example to List Network allPages, err := availablenetworks.List(networkClient).AllPages() if err != nil { panic(err) } allNetworks, err := availablenetworks.ExtractNetworks(allPages) if err != nil { panic(err) } for _, network := range allNetworks { fmt.Printf("%+v", network) }
Package network contains functionality for working GCLoud networks API resources Example to List Network allPages, err := availablenetworks.List(networkClient).AllPages() if err != nil { panic(err) } allNetworks, err := availablenetworks.ExtractNetworks(allPages) if err != nil { panic(err) } for _, network := range allNetworks { fmt.Printf("%+v", network) }
availablenetworks/testing
networks unit tests
networks unit tests
extensions/testing
extensions unit tests
extensions unit tests
networks
Package network contains functionality for working GCLoud networks API resources Example to List Network listOpts := networks.ListOpts{ } allPages, err := networks.List(networkClient).AllPages() if err != nil { panic(err) } allNetworks, err := networks.ExtractNetworks(allPages) if err != nil { panic(err) } for _, network := range allNetworks { fmt.Printf("%+v", network) } Example to Create a Network createOpts := networks.CreateOpts{ Name: "network_1", MTU: 1500, } networks, err := networks.Create(networkClient, createOpts).Extract() if err != nil { panic(err) } Example to Delete a Network networkID := "484cda0e-106f-4f4b-bb3f-d413710bbe78" err := networks.Delete(networkClient, networkID).ExtractErr() if err != nil { panic(err) }
Package network contains functionality for working GCLoud networks API resources Example to List Network listOpts := networks.ListOpts{ } allPages, err := networks.List(networkClient).AllPages() if err != nil { panic(err) } allNetworks, err := networks.ExtractNetworks(allPages) if err != nil { panic(err) } for _, network := range allNetworks { fmt.Printf("%+v", network) } Example to Create a Network createOpts := networks.CreateOpts{ Name: "network_1", MTU: 1500, } networks, err := networks.Create(networkClient, createOpts).Extract() if err != nil { panic(err) } Example to Delete a Network networkID := "484cda0e-106f-4f4b-bb3f-d413710bbe78" err := networks.Delete(networkClient, networkID).ExtractErr() if err != nil { panic(err) }
networks/testing
networks unit tests
networks unit tests

Jump to

Keyboard shortcuts

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