Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add New Command - List Minecraft Server #11 #25

Merged
merged 1 commit into from
Jul 13, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 48 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,25 @@
# minectl 🗺
+ [TL;DR 🚀](#tldr-)
+ [Usage ⚙](#usage-)
- [Access Token 🔑](#access-token-)
* [Civo](#civo)
* [Digital Ocean](#digital-ocean)
* [Scaleway](#scaleway)
- [Server Config 📋](#server-config-)
- [Create Minecraft Server 🏗](#create-minecraft-server-)
- [Delete Minecraft Server 🗑](#delete-minecraft-server-)
- [List Minecraft Server 📒](#list-minecraft-server-)
- [Monitoring 📊](#monitoring-)
- [Getting Started 🎫](#getting-started-)
+ [Supported cloud provider ☁](#supported-cloud-provider-)
+ [Known Limitation 😵](#known-limitation-)
+ [Contributing 🤝](#contributing-)
- [Contributing via GitHub](#contributing-via-github)
- [License](#license)
+ [Roadmap 🛣️](#roadmap-)
+ [Libraries & Tools 🔥](#libraries--tools-)
+ [Legal Disclaimer 👮](#legal-disclaimer-)

# minectl 🗺

![Minecraft](https://img.shields.io/badge/Minecraft-62B47A?style=for-the-badge&logo=Minecraft&logoColor=white)
![Go](https://img.shields.io/badge/go-00ADD8?style=for-the-badge&logo=go&logoColor=white)
Expand Down Expand Up @@ -26,7 +47,7 @@ the [release page](https://github.com/dirien/minectl/releases).

### Usage ⚙

#### Access Token
#### Access Token 🔑

`minectl` is completely build on zero-trust. It does not save any API Tokens, instead it looks them up in the ENV
variables.
Expand Down Expand Up @@ -123,6 +144,27 @@ Flags:
--id string contains the server id
```

#### List Minecraft Server 📒

```bash
minectl list -h

List all Minecraft Server.

Usage:
minectl list [flags]

Examples:
mincetl list \
--provider civo \
--region LON1

Flags:
-h, --help help for list
-p, --provider string The cloud provider - do, civo or scaleway
-r, --region string The region for your cloud provider
```

#### Monitoring 📊

Every instance of minectl 🗺, has following monitoring components included:
Expand All @@ -140,7 +182,7 @@ You can acces the `prometheus` via
http://<ip>:9090/graph
```

#### Getting Started
#### Getting Started 🎫

- [Civo Java Edition](docs/getting-started-civo.md)
- [Civo Bedrock Edition](docs/getting-started-civo-bedrock.md)
Expand Down Expand Up @@ -168,11 +210,11 @@ Feel free to join.

Apache License, Version 2.0

### Roadmap 🛣
### Roadmap 🛣

- [x] Support Bedrock edition [#10](https://github.com/dirien/minectl/issues/10)
- [x] Add monitoring capabilities to minectl server [#21](https://github.com/dirien/minectl/issues/21)
- [ ] List Minecraft Server
- [x] List Minecraft Server [#11](https://github.com/dirien/minectl/issues/11)
- [ ] Update Minecraft Server
- [ ] Support Mods and Plugins
- [ ] Add additional cloud provider
Expand All @@ -188,6 +230,7 @@ Apache License, Version 2.0
- https://github.com/civo/civogo
- https://github.com/digitalocean/godo
- https://github.com/scaleway/scaleway-sdk-go
- https://github.com/olekukonko/tablewriter

### Legal Disclaimer 👮

Expand Down
14 changes: 11 additions & 3 deletions cmd/minectl/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ import (
"fmt"
"github.com/minectl/pgk/common"
"github.com/minectl/pgk/provisioner"
"github.com/olekukonko/tablewriter"
"log"
"os"

"github.com/pkg/errors"
"github.com/spf13/cobra"
Expand Down Expand Up @@ -33,16 +35,22 @@ func runCreate(cmd *cobra.Command, _ []string) error {
if err != nil {
return errors.Wrap(err, "Please provide a valid MinecraftServer manifest file")
}
p, err := provisioner.NewCreateServerProvisioner(filename)
p, err := provisioner.NewProvisioner(filename)
if err != nil {
log.Fatal(err)
}
res, err := p.CreateServer()
if err != nil {
log.Fatal(err)
}
common.PrintMixedGreen("Minecraft Server IP: %s\n", res.PublicIP)
common.PrintMixedGreen("Minecraft Server ID: %s\n", res.ID)
table := tablewriter.NewWriter(os.Stdout)
table.SetHeader([]string{"ID", "NAME", "REGION", "TAGS", "IP"})

table.Append([]string{res.ID, res.Name, res.Region, res.Tags, res.PublicIP})

table.SetBorder(false)
fmt.Println("")
table.Render()

common.PrintMixedGreen("\nTo delete the server type:\n\n %s", fmt.Sprintf("minectl delete -f %s --id %s\n", filename, res.ID))
return err
Expand Down
2 changes: 1 addition & 1 deletion cmd/minectl/delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func runDelete(cmd *cobra.Command, _ []string) error {
return errors.Wrap(err, "failed to get 'filename' value.")
}
id, err := cmd.Flags().GetString("id")
newProvisioner, err := provisioner.NewDeleteServerProvisioner(id, filename)
newProvisioner, err := provisioner.NewProvisioner(filename, id)
if err != nil {
return err
}
Expand Down
46 changes: 38 additions & 8 deletions cmd/minectl/list.go
Original file line number Diff line number Diff line change
@@ -1,20 +1,26 @@
package minectl

import (
"fmt"
"github.com/minectl/pgk/provisioner"
"github.com/olekukonko/tablewriter"
"github.com/pkg/errors"
"github.com/spf13/cobra"
"os"
)

func init() {

minectlCmd.AddCommand(listCmd)
listCmd.Flags().String("region", "", "that contains the configuration for minectl")

listCmd.Flags().StringP("provider", "p", "", "The cloud provider - do, civo or scaleway")
listCmd.Flags().StringP("region", "r", "", "The region for your cloud provider")
}

var listCmd = &cobra.Command{
Use: "list",
Short: "List all Minecraft Server.",
Example: `mincetl list \
--provider civo \
--region LON1`,
RunE: runList,
SilenceUsage: true,
Expand All @@ -23,12 +29,36 @@ var listCmd = &cobra.Command{

func runList(cmd *cobra.Command, _ []string) error {

//_, err := cmd.Flags().GetString("filename")
/*if err != nil {
return errors.Wrap(err, "failed to get 'filename' value.")
provider, err := cmd.Flags().GetString("provider")
if err != nil {
return errors.Wrap(err, "failed to get 'provider' value.")
}
region, err := cmd.Flags().GetString("region")
if err != nil {
return errors.Wrap(err, "failed to get 'region' value.")
}

newProvisioner, err := provisioner.ListProvisioner(provider, region)
if err != nil {
return err
}
servers, err := newProvisioner.ListServer()
if err != nil {
return err
}

if len(servers) > 0 {
fmt.Println("")
table := tablewriter.NewWriter(os.Stdout)
table.SetHeader([]string{"ID", "NAME", "REGION", "TAGS", "IP"})

for _, server := range servers {
table.Append([]string{server.ID, server.Name, server.Region, server.Tags, server.PublicIP})
}
table.SetBorder(false)
table.Render()
} else {
fmt.Println("🤷 No server found")
}
do, _ := provisioner.NewProvisioner(filename)
res, err := do.UpdateServer()
common.PrintMixedGreen("Minecraft Server IP: %s\n", res.PublicIP)*/
return nil
}
4 changes: 2 additions & 2 deletions config/bedrock/server-civo.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
apiVersion: ediri.io/minectl/v1alpha1
kind: MinecraftServer
metadata:
name: minecraft-server
name: minecraft-server-be
spec:
server:
cloud: civo
region: LON1
size: g3.large
volumeSize: 100
ssh: "/Users/dirien/Tools/repos/stackit-minecraft/minecraft/ssh/minecraft.pub"
ssh: "/Users/dirien/Tools/repos/stackit-minecraft/minecraft/ssh/minecraft-be.pub"
minecraft:
edition: bedrock
properties: |
Expand Down
4 changes: 2 additions & 2 deletions config/bedrock/server-do.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
apiVersion: ediri.io/minectl/v1alpha1
kind: MinecraftServer
metadata:
name: minecraft-server
name: minecraft-server-be
spec:
server:
cloud: do
region: fra1
size: s-4vcpu-8gb
volumeSize: 100
ssh: "/Users/dirien/Tools/repos/stackit-minecraft/minecraft/ssh/minecraft.pub"
ssh: "/Users/dirien/Tools/repos/stackit-minecraft/minecraft/ssh/minecraft-be.pub"
minecraft:
edition: bedrock
properties: |
Expand Down
4 changes: 2 additions & 2 deletions config/bedrock/server-scaleway.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
apiVersion: ediri.io/minectl/v1alpha1
kind: MinecraftServer
metadata:
name: minecraft-server
name: minecraft-server-bedrock
spec:
server:
cloud: scaleway
region: fr-par-1
size: GP1-XS
volumeSize: 100
ssh: "/Users/dirien/Tools/repos/stackit-minecraft/minecraft/ssh/minecraft.pub"
ssh: "/Users/dirien/Tools/repos/stackit-minecraft/minecraft/ssh/minecraft-be.pub"
minecraft:
edition: bedrock
properties: |
Expand Down
5 changes: 3 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,16 @@ require (
github.com/fatih/color v1.12.0
github.com/kr/pretty v0.2.1 // indirect
github.com/kr/text v0.2.0 // indirect
github.com/magiconair/properties v1.8.0
github.com/morikuni/aec v1.0.0
github.com/olekukonko/tablewriter v0.0.5
github.com/pkg/errors v0.9.1
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.7
github.com/spf13/cobra v1.0.0
github.com/spf13/pflag v1.0.5 // indirect
github.com/stretchr/testify v1.6.1 // indirect
github.com/stretchr/testify v1.6.1
github.com/xeipuuv/gojsonschema v1.2.0
golang.org/x/oauth2 v0.0.0-20210628180205-a41e5a781914
golang.org/x/tools v0.0.0-20200825202427-b303f430e36d
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 // indirect
sigs.k8s.io/yaml v1.2.0
)
12 changes: 5 additions & 7 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMn
github.com/civo/civogo v0.2.47 h1:qMzlm75hYOfuuvB0BXBaWhe/073TxzMNpYWkNKb5JR8=
github.com/civo/civogo v0.2.47/go.mod h1:SR0ZOhABfQHjgNQE3UyfX4gaYsrfslkPFRFMx5P29rg=
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f h1:WBZRG4aNOuI15bLRrCgN8fCq8E5Xuty6jGbmSNEvSsU=
github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk=
github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE=
Expand All @@ -69,9 +68,7 @@ github.com/dnaeon/go-vcr v1.0.1 h1:r8L/HqC0Hje5AXMu1ooW8oyQyOFv4GxqpL0nRP7SLLY=
github.com/dnaeon/go-vcr v1.0.1/go.mod h1:aBB1+wY4s93YsC3HHjMBMrwTj2R9FHDzUr9KyGc8n1E=
github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
github.com/envoyproxy/go-control-plane v0.9.4 h1:rEvIZUSZ3fx39WIi3JkQqQBitGwpELBIYWeBVh6wn+E=
github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98=
github.com/envoyproxy/protoc-gen-validate v0.1.0 h1:EQciDnbrYxy13PgWoY8AqoxGiPrpgBZ1R8UNe3ddc+A=
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=
github.com/fatih/color v1.12.0 h1:mRhaKNwANqRgUBGKmnI5ZxEk7QXmjQeCcuYFMX2bfcc=
Expand Down Expand Up @@ -162,21 +159,24 @@ github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
github.com/magiconair/properties v1.8.0 h1:LLgXmsheXeRoUOBOjtwPQCWIYqM/LU1ayDtDePerRcY=
github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ=
github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE=
github.com/mattn/go-colorable v0.1.8 h1:c1ghPdyEDarC70ftn0y+A/Ee++9zz8ljHG1b13eJ0s8=
github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=
github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=
github.com/mattn/go-isatty v0.0.12 h1:wuysRhFDzyxgEmMf5xjvJ2M9dZoWAXNNr5LSBS7uHXY=
github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU=
github.com/mattn/go-runewidth v0.0.9 h1:Lm995f3rfxdpd6TSmuVCHVb/QhupuXlYr8sCI/QdE+0=
github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI=
github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A=
github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc=
github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U=
github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec=
github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY=
github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic=
github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
Expand Down Expand Up @@ -356,7 +356,6 @@ golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fq
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
golang.org/x/text v0.3.3 h1:cokOdA+Jmi5PJGXLlLllQSgYigAEfHXJAERHVMaCc2k=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
Expand Down Expand Up @@ -401,6 +400,7 @@ golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roY
golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
golang.org/x/tools v0.0.0-20200825202427-b303f430e36d h1:W07d4xkoAUSNOkOzdzXCdFGxT7o2rW4q8M34tB2i//k=
golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
Expand Down Expand Up @@ -458,7 +458,6 @@ google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEY
google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA=
google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
google.golang.org/genproto v0.0.0-20200825200019-8632dd797987 h1:PDIOdWxZ8eRizhKa1AAvY53xsvLB1cWorMjslvY3VA8=
google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38=
Expand All @@ -472,7 +471,6 @@ google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8
google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60=
google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk=
google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=
google.golang.org/grpc v1.31.0 h1:T7P4R73V3SSDPhH7WW7ATbfViLtmamH0DKrP3f9AuDI=
google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
Expand Down
5 changes: 4 additions & 1 deletion pgk/automation/automation.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import "github.com/minectl/pgk/model"
type Automation interface {
CreateServer(args ServerArgs) (*RessourceResults, error)
DeleteServer(id string, args ServerArgs) error
ListServer(args ServerArgs) (*[]RessourceResults, error)
ListServer() ([]RessourceResults, error)
UpdateServer(args ServerArgs) (*RessourceResults, error)
}

Expand All @@ -23,5 +23,8 @@ type ServerArgs struct {

type RessourceResults struct {
ID string
Name string
Region string
PublicIP string
Tags string
}
Loading