noona

package
v0.0.0-...-c103791 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 6, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AnonymousClient

type AnonymousClient struct {
	Client *noona.ClientWithResponses
	// contains filtered or unexported fields
}

func (AnonymousClient) CodeTokenExchange

func (n AnonymousClient) CodeTokenExchange(code string) (*noona.OAuthToken, error)

func (AnonymousClient) RefreshTokenExchange

func (n AnonymousClient) RefreshTokenExchange(refreshToken string) (*noona.OAuthToken, error)

type Client

type Client struct {
	Client *noona.ClientWithResponses
	// contains filtered or unexported fields
}

func (Client) GetUser

func (a Client) GetUser() (*noona.User, error)

func (Client) SetupSomeResource

func (a Client) SetupSomeResource(companyID string) error

func (Client) SetupWebhook

func (a Client) SetupWebhook(companyID string) error

type Config

type Config struct {
	BaseURL      string `default:"https://api.noona.is"`
	AppStoreURL  string `default:"https://hq.noona.app/week#settings-apps"`
	ClientID     string `default:""` // TODO: Fill in with your client ID
	ClientSecret string `default:""` // TODO: Fill in with your client secret
	// Our app will rely on webhooks to implement the Blacklist.
	// We need to know where the webhook should be sent.
	AppBaseURL string `default:"http://localhost:8080"`
	// The Bearer token that all webhooks will be sent with
	AppWebhookToken string `default:"very-secure-token-secret"`
}

type Service

type Service struct {
	// contains filtered or unexported fields
}

func New

func New(cfg Config, logger logger.Logger, store store.Store) Service

func (Service) AnonymousClient

func (s Service) AnonymousClient() (AnonymousClient, error)

func (Service) Client

func (s Service) Client(token noona.OAuthToken) (Client, error)

func (Service) ClientID

func (s Service) ClientID() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL