Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { ClientID string `json:"client_id"` ClientSecret string `json:"client_secret"` ClientName string `json:"client_name"` ClientKind string `json:"client_kind,omitempty"` ClientURI string `json:"client_uri,omitempty"` LogoURI string `json:"logo_uri,omitempty"` PolicyURI string `json:"policy_uri,omitempty"` RedirectURIs []string `json:"redirect_uris"` RegistrationToken string `json:"registration_access_token,omitempty"` SecretExpiresAt int `json:"client_secret_expires_at"` SoftwareID string `json:"software_id"` SoftwareVersion string `json:"software_version,omitempty"` }
type HTTPClient ¶
type HTTPClient struct {
// contains filtered or unexported fields
}
HTTPClient is the main interface used to interact with an the Client resource.
func NewHTTPClient ¶
func NewHTTPClient(inst *instance.Instance) *HTTPClient
NewHTTPClient instantiate a new [Service] for the given domain.
The domain is an base url to your instance. For example it would be "https://foobar.mycozy.cloud" for the cozy hosted client with the "foobar" account.
func (*HTTPClient) Register ¶
func (s *HTTPClient) Register(ctx context.Context, cmd *RegisterCmd) (*Client, error)
type RegisterCmd ¶
type RegisterCmd struct { Domain string `json:"-"` ClientName string `json:"client_name"` SoftwareID string `json:"software_id"` ClientKind string `json:"client_kind,omitempty"` ClientURI string `json:"client_uri,omitempty"` LogoURI string `json:"logo_uri,omitempty"` PolicyURI string `json:"policy_uri,omitempty"` RedirectURIs []string `json:"redirect_uris"` SecretExpiresAt int `json:"client_secret_expires_at"` SoftwareVersion string `json:"software_version,omitempty"` NotificationPlatform string `json:"notification_platform"` }
Click to show internal directories.
Click to hide internal directories.