-
Notifications
You must be signed in to change notification settings - Fork 308
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
vpcs: Support listing members of a VPC. #439
vpcs: Support listing members of a VPC. #439
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😄
@@ -214,3 +231,35 @@ func (v *VPCsServiceOp) Delete(ctx context.Context, id string) (*Response, error | |||
|
|||
return resp, nil | |||
} | |||
|
|||
func (v *VPCsServiceOp) ListMembers(ctx context.Context, id string, request *VPCListMembersRequest, opt *ListOptions) ([]*VPCMember, *Response, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Golang question: Is it a paradigm that interface functions return pointers and not actual values?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not necessarily, but it's the general pattern we're using in godo.
@@ -15,6 +15,7 @@ type VPCsService interface { | |||
Create(context.Context, *VPCCreateRequest) (*VPC, *Response, error) | |||
Get(context.Context, string) (*VPC, *Response, error) | |||
List(context.Context, *ListOptions) ([]*VPC, *Response, error) | |||
ListMembers(context.Context, string, *VPCListMembersRequest, *ListOptions) ([]*VPCMember, *Response, error) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting that it's never been implemented!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sweet!
Looks like this method was never implemented:
https://developers.digitalocean.com/documentation/v2/#list-the-member-resources-of-a-vpc