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

Golang API Client not working #1517

Open
henrikengelbrink opened this issue Jun 23, 2020 · 6 comments
Open

Golang API Client not working #1517

henrikengelbrink opened this issue Jun 23, 2020 · 6 comments

Comments

@henrikengelbrink
Copy link

Hello,

I'm currently trying to use the Golang API client for voyager to create a voyager ingress through my golang application.

I'm importing the golang client with the following line:
voyagerClient "github.com/appscode/voyager/client/clientset/versioned"

Unfortunately, I get the following error:

github.com/appscode/voyager/apis/voyager/v1beta1: github.com/appscode/voyager@v0.0.0-20200620081623-d9c38862e7b6: parsing go.mod:
	module declares its path as: voyagermesh.dev/voyager
	        but was required as: github.com/appscode/voyager

I'm not sure whether it is my fault or a bug with voyager.
Do you have a documentation about how to use the golang client somewhere ?

Best,
Henrik

@hossainemruz
Copy link

Try importing as

voyagerClient "voyagermesh.dev/voyager/client/clientset/versioned"

@henrikengelbrink
Copy link
Author

@hossainemruz Thank you for your answer.

Import with your line results with the following error:

go: finding voyagermesh.dev/voyager latest
go: voyagermesh.dev/voyager@v0.0.0-20200620081623-d9c38862e7b6 requires
	github.com/Azure/go-autorest/autorest/azure/auth@v0.0.0-00010101000000-000000000000: invalid version: unknown revision 000000000000

@hossainemruz
Copy link

Try adding these in your go.mod file

replace github.com/Azure/go-autorest => github.com/Azure/go-autorest v13.0.0+incompatible

replace github.com/Azure/go-autorest/autorest => github.com/Azure/go-autorest/autorest v0.9.0

replace github.com/Azure/go-autorest/autorest/adal => github.com/Azure/go-autorest/autorest/adal v0.5.0

replace github.com/Azure/go-autorest/autorest/azure/auth => github.com/Azure/go-autorest/autorest/azure/auth v0.2.0

replace github.com/Azure/go-autorest/autorest/date => github.com/Azure/go-autorest/autorest/date v0.1.0

replace github.com/Azure/go-autorest/autorest/mocks => github.com/Azure/go-autorest/autorest/mocks v0.2.0

replace github.com/Azure/go-autorest/autorest/to => github.com/Azure/go-autorest/autorest/to v0.2.0

replace github.com/Azure/go-autorest/autorest/validation => github.com/Azure/go-autorest/autorest/validation v0.1.0

replace github.com/Azure/go-autorest/logger => github.com/Azure/go-autorest/logger v0.1.0

replace github.com/Azure/go-autorest/tracing => github.com/Azure/go-autorest/tracing v0.5.0

@henrikengelbrink
Copy link
Author

If I replace all the Azure dependencies, I get the following error:

go: finding voyagermesh.dev/voyager latest
go: voyagermesh.dev/voyager@v0.0.0-20200620081623-d9c38862e7b6 requires
	github.com/prometheus/haproxy_exporter@v0.0.0-00010101000000-000000000000: invalid version: unknown revision 000000000000

@hossainemruz
Copy link

Use the respective replace line in your go.mod file from here:

voyager/go.mod

Line 77 in d9c3886

github.com/prometheus/haproxy_exporter => github.com/appscode/haproxy_exporter v0.7.2-0.20190508003714-b4abf52090e2

Perhaps, you can copy all the replace line of the linked file in your go.mod .

@hossainemruz
Copy link

@henrikengelbrink Please close the issue if your problem has been fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants