The code in this package are generated by rancher/go-rancher.
But in order to fix some compatibility issues, you need to use this repo, and you should checkout the longhorn-v1
branch.
If you have a longhorn api URL, you can use this script:
./scripts/generate-longhorn-schemas.sh http://manager-api-ip:port
Just use cp to copy these code is fine, but you should update package name in longhorn-manager
:
cd longhorn-manager/client
sed -i -e 's/package longhorn/package client/g' *.go