Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ApplicationLink ¶
type ApplicationLink struct { State graphql.String `graphql:"state"` UserAddress graphql.String `graphql:"user_address"` }
func (*ApplicationLink) IsValid ¶
func (a *ApplicationLink) IsValid() bool
type ApplicationLinks ¶ added in v0.2.0
type ApplicationLinks []*ApplicationLink
func (ApplicationLinks) AreAllInvalid ¶ added in v0.2.0
func (a ApplicationLinks) AreAllInvalid() bool
func (ApplicationLinks) IsAnyValid ¶ added in v0.2.0
func (a ApplicationLinks) IsAnyValid() bool
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client represents a GraphQL client
func (*Client) CheckIsValidator ¶
func (c *Client) CheckIsValidator(appLink *ApplicationLink) (bool, error)
CheckIsValidator checks whether the user having the given username is a validator or not based on the data present on the specific GraphQL endpoint.
func (*Client) GetDiscordLinks ¶ added in v0.2.0
func (c *Client) GetDiscordLinks(username string) (ApplicationLinks, error)
GetDiscordLinks returns the (possibly multiple) ApplicationLink representing the connection between the Desmos Profile and Discord. It returns an error if the link was not found, or it's not in the correct state.
Click to show internal directories.
Click to hide internal directories.