Documentation ¶
Index ¶
- func Convert(from interface{}, to interface{}) error
- func RandString(n int) string
- func ToJsonNoEscape(t interface{}) ([]byte, error)
- type Client
- type ClientConfig
- type GraphQLRequest
- type GraphQLResponse
- type Invitation
- type InvitationService
- type Organization
- type OrganizationMember
- type Product
- type ProductUpdate
- type UpdateUserRequest
- type User
- type UserList
- type UserService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Convert ¶
func Convert(from interface{}, to interface{}) error
Convert is typically used to convert map[string]interface{} to a struct in the same json structure.
func RandString ¶
RandString returns random string at specified length.
func ToJsonNoEscape ¶
Note there will be a new line character at the end of the output.
Types ¶
type Client ¶
type Client struct { InvitationService *InvitationService UserService *UserService // contains filtered or unexported fields }
func NewClient ¶
func NewClient(config ClientConfig) (*Client, error)
Does not involve any network interactions.
func (*Client) MakeGraphQLRequest ¶
func (c *Client) MakeGraphQLRequest(graphQLRequest *GraphQLRequest) (*GraphQLResponse, error)
type ClientConfig ¶
type GraphQLRequest ¶
type GraphQLResponse ¶
type GraphQLResponse map[string]interface{}
func NewGraphQLResponse ¶
func NewGraphQLResponse(body io.Reader, key string) (*GraphQLResponse, error)
type Invitation ¶
type Invitation struct { Email string `json:"email"` Role string `json:"role"` Products []ProductUpdate `json:"products"` }
type InvitationService ¶
type InvitationService struct {
// contains filtered or unexported fields
}
func (*InvitationService) InviteUser ¶
func (is *InvitationService) InviteUser(user *Invitation) error
func (*InvitationService) ResendInvitation ¶
func (is *InvitationService) ResendInvitation(email string) error
func (*InvitationService) RevokePendingInvitation ¶
func (is *InvitationService) RevokePendingInvitation(email string) error
type Organization ¶
type Organization struct { Id string `json:"id"` Members []OrganizationMember `json:"members"` }
type OrganizationMember ¶
type ProductUpdate ¶
Unfortunately Access is not required here.
type UpdateUserRequest ¶
type UpdateUserRequest struct { UserId string `json:"userId"` Role string `json:"role"` Products []ProductUpdate `json:"products"` }
type UserList ¶
type UserList struct { OwnerUserId string `json:"id"` Organization Organization `json:"currentOrganization"` }
type UserService ¶
type UserService struct {
// contains filtered or unexported fields
}
func (*UserService) List ¶
func (us *UserService) List() (*UserList, error)
func (*UserService) Update ¶
func (us *UserService) Update(update UpdateUserRequest) error
Click to show internal directories.
Click to hide internal directories.