Documentation
¶
Overview ¶
Package project carries the Project resource's wire types. Project API methods still live on github.com/dmalch/go-geni's root Client during the pre-1.0 reshape and migrate into this package in a later PR; this PR lifts only the types.
Index ¶
- type BulkResponse
- type Client
- func (c *Client) AddProfile(ctx context.Context, profileId, projectId string) (*profile.Profile, error)
- func (c *Client) Collaborators(ctx context.Context, projectId string, page int) (*profile.BulkResponse, error)
- func (c *Client) Followers(ctx context.Context, projectId string, page int) (*profile.BulkResponse, error)
- func (c *Client) Get(ctx context.Context, projectId string) (*Project, error)
- func (c *Client) Profiles(ctx context.Context, projectId string, page int) (*profile.BulkResponse, error)
- type Project
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BulkResponse ¶
type BulkResponse struct {
Results []Project `json:"results,omitempty"`
Page int `json:"page,omitempty"`
NextPage string `json:"next_page,omitempty"`
PrevPage string `json:"prev_page,omitempty"`
}
BulkResponse is the paginated envelope returned by project-bulk endpoints (followed-projects, document/{id}/projects, …).
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client wraps a transport.Client with the project endpoints.
func (*Client) AddProfile ¶
func (c *Client) AddProfile(ctx context.Context, profileId, projectId string) (*profile.Profile, error)
AddProfile tags a profile into a project. Returns the updated profile (with the new project id in its project_ids list).
func (*Client) Collaborators ¶
func (c *Client) Collaborators(ctx context.Context, projectId string, page int) (*profile.BulkResponse, error)
Collaborators returns the paginated list of users who collaborate on a project. The response is shaped as a profile.BulkResponse; each entry is a profile object representing the collaborator. page is 1-indexed; values ≤0 omit the parameter. Max 50 collaborators per page.
func (*Client) Followers ¶
func (c *Client) Followers(ctx context.Context, projectId string, page int) (*profile.BulkResponse, error)
Followers returns the paginated list of users following a project. The response is shaped as a profile.BulkResponse; each entry is a profile object representing the follower. page is 1-indexed; values ≤0 omit the parameter. Max 50 followers per page.
func (*Client) Profiles ¶
func (c *Client) Profiles(ctx context.Context, projectId string, page int) (*profile.BulkResponse, error)
Profiles returns the paginated list of profiles tagged to a project. page is 1-indexed; values ≤0 omit the parameter (Geni defaults to page 1). Max 50 profiles per page.
type Project ¶
type Project struct {
// ID is the project's id.
ID string `json:"id,omitempty"`
// Name is the project's name.
Name string `json:"name,omitempty"`
// Description is the project's description.
Description *string `json:"description,omitempty"`
// UpdatedAt is the timestamp of when the project was last updated.
UpdatedAt string `json:"updated_at,omitempty"`
// CreatedAt is the timestamp of when the project was created.
CreatedAt string `json:"created_at,omitempty"`
}
Project is Geni's Project resource — a collaborative grouping (e.g. "Ancestors of …", "World War II Veterans").