Documentation
¶
Index ¶
- type Client
- func (c *Client) GetProjectAccessTokenByProjectIDAndName(projectID int, name string) (*ProjectAccessToken, error)
- func (c *Client) GetProjectByName(name string) (*Project, error)
- func (c *Client) GetUser(email string) (int, error)
- func (c *Client) InviteUser(teamID int, email string) (*InviteResponse, error)
- func (c *Client) ListInvites(teamID int) ([]Invite, error)
- func (c *Client) ListProjectAccessTokens(projectID int) ([]*ProjectAccessToken, error)
- func (c *Client) ListProjects() ([]*Project, error)
- func (c *Client) ListUsers() (*ListUsersResponse, error)
- func (c *Client) RemoveUserTeam(email string, teamID int) error
- type Invite
- type InviteResponse
- type ListInvitesResponse
- type ListUsersResponse
- type Option
- type Project
- type ProjectAccessToken
- type VarsUsers
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
Client represents the rollbar client.
func (*Client) GetProjectAccessTokenByProjectIDAndName ¶
func (c *Client) GetProjectAccessTokenByProjectIDAndName(projectID int, name string) (*ProjectAccessToken, error)
GetProjectAccessTokenByProjectIDAndName returns the first project access token from the list-projects-tokens call that matches a given name nad project id. If there is no matching project, return nil.
func (*Client) GetProjectByName ¶
GetProjectByName returns the first project from the list-projects call that matches a given name. If there is no matching project returns nil.
func (*Client) InviteUser ¶
func (c *Client) InviteUser(teamID int, email string) (*InviteResponse, error)
InviteUser sends an invitation to a user.
func (*Client) ListInvites ¶
ListInvites lists all the invites.
func (*Client) ListProjectAccessTokens ¶
func (c *Client) ListProjectAccessTokens(projectID int) ([]*ProjectAccessToken, error)
ListProjectAccessTokens lists the projects access tokens for a given project id https://docs.rollbar.com/reference#list-all-project-access-tokens
func (*Client) ListProjects ¶
ListProjects lists the projects for this API Key https://docs.rollbar.com/reference#list-all-projects
func (*Client) ListUsers ¶
func (c *Client) ListUsers() (*ListUsersResponse, error)
ListUsers : A function for listing the users.
type Invite ¶
type Invite struct { ID int `json:"id"` FromUserID int `json:"from_user_id"` TeamID int `json:"team_id"` ToEmail string `json:"to_email"` Status string `json:"status"` DateCreated int `json:"date_created"` DateRedeemed int `json:"date_redeemed"` }
Invite represents nested invites from the ListInvitesResponse.
type InviteResponse ¶
type InviteResponse struct { Error int `json:"err"` Result struct { ID int `json:"id"` FromUserID int `json:"from_user_id"` TeamID int `json:"team_id"` ToEmail string `json:"to_email"` Status string `json:"status"` DateCreated int `json:"date_created"` DateRedeemed int `json:"date_redeemed"` } }
InviteResponse represents the list invites response.
type ListInvitesResponse ¶
ListInvitesResponse represents the ListInvites response.
type ListUsersResponse ¶
type ListUsersResponse struct { Error int `json:"err"` Result struct { Users []struct { Username string `json:"username"` ID int `json:"id"` Email string `json:"email"` } } }
ListUsersResponse represents the list users response.
type Project ¶
type Project struct { AccountID int `json:"account_id"` ID int `json:"id"` DateCreated int `json:"date_created"` DateModified int `json:"date_modified"` Name string `json:"name"` }
Project represents a project
type ProjectAccessToken ¶
type ProjectAccessToken struct { ProjectID int `json:"project_id"` AccessToken string `json:"access_token"` Name string `json:"name"` Status string `json:"status"` DateCreated int `json:"date_created"` DateModified int `json:"date_modified"` }
ProjectAccessToken represents a project access token