| 1234567891011121314151617181920212223 |
- package input
- import (
- "encoding/json"
- )
- type DOKS struct {
- DORegion string `json:"do_region"`
- DOToken string `json:"do_token"`
- ClusterName string `json:"cluster_name"`
- }
- func (doks *DOKS) GetInput() ([]byte, error) {
- return json.Marshal(doks)
- }
- func GetDOKSInput(bytes []byte) (*DOKS, error) {
- res := &DOKS{}
- err := json.Unmarshal(bytes, res)
- return res, err
- }
|