Commit Graph

56 Commits

Author SHA1 Message Date
Juan Carlos Mejías Rodríguez
49eb081130 Add function to get user by its name 2019-11-26 23:27:15 -05:00
Juan Carlos Mejías Rodríguez
26a3efdd3a Add options object for PortainerClient.StackList() 2019-08-26 09:10:28 -04:00
Juan Carlos Mejías Rodríguez
aa606782af Rename PortainerClient.GetEndpointDockerInfo() to EndpointDockerInfo() 2019-08-26 09:10:28 -04:00
Juan Carlos Mejías Rodríguez
87ba553153 Rename PortainerClient.GetStacks() to StackList() 2019-08-26 09:10:28 -04:00
Juan Carlos Mejías Rodríguez
623788b624 Rename PortainerClient.GetEndpointGroups() to EndpointGroupList() 2019-08-26 09:10:28 -04:00
Juan Carlos Mejías Rodríguez
0adb18bc8a Rename PortainerClient.GetEndpoints() to EndpointList() 2019-08-26 09:10:28 -04:00
Juan Carlos Mejías Rodríguez
161fc48b5a Add comments to exported types to pass go-lint 2019-08-23 13:12:53 -04:00
Juan Carlos Mejías Rodríguez
be51da44bf Rename some identifiers to pass go-lint 2019-08-23 12:35:01 -04:00
Juan Carlos Mejías Rodríguez
e1b4a6f436 Move "getting endpoint info..." debug message out of common.GetEndpointSwarmClusterId() 2019-08-23 11:19:42 -04:00
Juan Carlos Mejías Rodríguez
b4f6dd7476 Add function to get endpoint group by name 2019-08-17 16:37:41 -04:00
Juan Carlos Mejías Rodríguez
6c4ecb1c90 Add functions to get endpoint from list by name and by id 2019-08-15 22:40:56 -04:00
Juan Carlos Mejías Rodríguez
a6f4f88fd2 Add function to get endpoint by its name 2019-08-15 20:51:36 -04:00
Juan Carlos Mejías Rodríguez
d28a78cf28 Enhance error handling 2019-08-15 20:51:17 -04:00
Juan Carlos Mejías Rodríguez
0cdaf49425 Mover version-related code to the version package 2019-08-13 23:33:49 -04:00
Juan Carlos Mejías Rodríguez
50d246ecf7 Lowercase error messages 2019-08-10 18:28:00 -04:00
Juan Carlos Mejías Rodríguez
65c7b6cafc Add helper to generate docs for --format flags 2019-08-10 16:49:37 -04:00
Juan Carlos Mejías Rodríguez
0b887b414b Replace Portainer struct copies with original ones wherever possible 2019-08-10 12:14:55 -04:00
Juan Carlos Mejías Rodríguez
49367f2a11 Split config setting and getting in two new commands config set and config get 2019-08-09 19:11:14 -04:00
Juan Carlos Mejías Rodríguez
3f788efff5 Remove commit hash uppercase in version and User-Agent strings 2019-08-09 15:17:55 -04:00
Juan Carlos Mejías Rodríguez
cf823f9dcf Add custom User-Agent to API requests 2019-08-09 15:16:12 -04:00
Juan Carlos Mejías Rodríguez
7fcdd73066 Move Portainer API URL parsing outside the client 2019-08-09 12:39:40 -04:00
Juan Carlos Mejías Rodríguez
dd8e928698 Update version string building 2019-08-09 01:42:13 -04:00
Juan Carlos Mejías Rodríguez
a6a4a70996 Use + as a build metadata separator in version
Follows SemVer
2019-08-09 01:42:13 -04:00
Juan Carlos Mejías Rodríguez
ea30e28261 Move version setting to goreleaser 2019-08-09 01:42:13 -04:00
Juan Carlos Mejías Rodríguez
535eada8ab Guess endpoint ID if not set when deploying or removing stacks 2019-08-09 01:42:13 -04:00
Juan Carlos Mejías Rodríguez
fe469e1154 Split common error printing into "Error" and message with details 2019-08-08 11:56:07 -04:00
Juan Carlos Mejías Rodríguez
b3f1989a25 Fix inconsistencies with EndpointID and SwarmID filtering 2019-08-08 11:56:07 -04:00
Juan Carlos Mejías Rodríguez
faf021e863 Replace debug and verbose modes with logging levels 2019-08-08 11:56:07 -04:00
Juan Carlos Mejías Rodríguez
7589f97105 Move util.NewTabWriter to common.NewTabWriter 2019-08-08 11:56:07 -04:00
Juan Carlos Mejías Rodríguez
d058337412 Move PrintDebugRequest() and PrintDebugResponse() logic to client hooks declaration 2019-08-08 11:56:07 -04:00
Juan Carlos Mejías Rodríguez
5748d862bb Move PrintDebugRequest() and PrintDebugResponse() calls in client to hooks 2019-08-08 11:56:07 -04:00
Juan Carlos Mejías Rodríguez
356979a7a4 Move util.CheckError to common.CheckError 2019-08-08 11:56:07 -04:00
Juan Carlos Mejías Rodríguez
27b418cb3c Rename client.ClientConfig to client.Config 2019-08-08 11:56:07 -04:00
Juan Carlos Mejías Rodríguez
9c79379191 Split common package into common, client, and util packages 2019-08-08 11:56:07 -04:00
Juan Carlos Mejías Rodríguez
a3b58499b8 Add interface for Portainer client 2019-08-08 11:56:07 -04:00
Juan Carlos Mejías Rodríguez
4f3892368e Move deactivation of token usage for authentication into Authenticate() 2019-08-08 11:56:07 -04:00
Juan Carlos Mejías Rodríguez
cdc54111a1 Add flexibility to Portainer client creation 2019-08-08 11:56:07 -04:00
Juan Carlos Mejías Rodríguez
a0d75c8df9 Rename client to cachedClient 2019-08-08 11:56:07 -04:00
Juan Carlos Mejías Rodríguez
64619fc90f Remove error return from Client.Clone() 2019-08-08 11:56:07 -04:00
Juan Carlos Mejías Rodríguez
0d42ed73c6 Enhance Portainer URL parsing in Client 2019-08-08 11:56:07 -04:00
Juan Carlos Mejías Rodríguez
00439cc1c1 Delay new auth token retrieval until it is really necessary 2019-08-08 11:56:07 -04:00
Juan Carlos Mejías Rodríguez
04a05fad86 Move clientConfig declaration to the top 2019-08-08 11:56:07 -04:00
Juan Carlos Mejías Rodríguez
8d0fb72034 Fix PortainerClient.Authenticate usage of viper 2019-08-08 11:56:07 -04:00
Juan Carlos Mejías Rodríguez
064e7789fb Add comments to Client 2019-08-08 11:56:07 -04:00
Juan Carlos Mejías Rodríguez
5dc5f43763 Remove unused CheckResponseForErrors error handling helper
It's logic is now implemented into the Client
2019-08-08 11:56:07 -04:00
Juan Carlos Mejías Rodríguez
93f08172ac Rename Client.DoJson to doJson 2019-08-08 11:56:07 -04:00
Juan Carlos Mejías Rodríguez
70621c750c Move URL handling logic (calls to DoJson) into Client 2019-08-08 11:56:07 -04:00
Juan Carlos Mejías Rodríguez
7f048def9c Remove old unused connection and authentication code 2019-08-08 11:56:07 -04:00
Juan Carlos Mejías Rodríguez
fa666db1b8 Replace manual request creation and marshaling with new client 2019-08-08 11:56:07 -04:00
Juan Carlos Mejías Rodríguez
1b1c2bc1d1 Encapsulate network communication into a Client struct 2019-08-08 11:56:07 -04:00