I am working on a project which require me to use docker engine api, i am using go-sdk.
In which i want to create a new service (docker swarm service).
Going thought the documentation of docker-engine-api, and into the section of CreateService (Docker Engine API v1.42 Reference)
I found that inorder to create a new service we need a long-json-object called ServiceSpec.
What i have is a simple compore file (service file) which is a yaml specification. i want it to convert into that object in go-sdk so that i can create service in my app.
Later after more research, i found out that there is not straight forward way of doing it
So how can i just parse the string file data into object. That is how can i convert my yaml file (service schema) into nice go object. For this i need to represent swarm file in an object.
what is that object?