onboarding

package
v0.0.0-...-32f65d2 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2025 License: AGPL-3.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCachedTenantDB

func GetCachedTenantDB(DBURL string, ctx context.Context) (*sql.DB, error)

func RegisterNamespace

func RegisterNamespace(ctx context.Context, hostPort, namespace string, retentionDays int) error

Types

type Account

type Account struct {
	ID    int64
	Login string
}

type Config

type Config struct {
	TemporalHostPort            string
	TemporalOnboardingNamespace string
	TemporalOnboardingQueueName string
	UsersDSN                    string
}

func LoadConfig

func LoadConfig() (*Config, error)

type CreateTenantConfig

type CreateTenantConfig struct {
	TursoApiURL                 string
	TursoOrganizationSlug       string
	TursoDBGroupName            string
	TursoAuthToken              string
	TenantSeedDBURL             string
	OrganizationsTenantMapDBURL string
}

func LoadCreateTenantConfig

func LoadCreateTenantConfig() (*CreateTenantConfig, error)

type DB

type DB struct {
	DB *sql.DB
}

func NewDB

func NewDB(DBURL string, ctx context.Context) (DB, error)

type ExtendedMember

type ExtendedMember struct {
	*Member
	Email *string
	Name  *string
}

type GithubAppClient

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

func NewAppClient

func NewAppClient(cfg GithubConfig) (*GithubAppClient, error)

func (*GithubAppClient) GetInstallationAccount

func (gac *GithubAppClient) GetInstallationAccount(
	ctx context.Context,
	installationID int64,
) (*Account, error)

type GithubConfig

type GithubConfig struct {
	GithubAppId         int64
	GithubAppPrivateKey []byte
	RoundTripper        http.RoundTripper
}

func LoadGithubConfig

func LoadGithubConfig() (*GithubConfig, error)

type GithubInstallationClient

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

func GetCachedGithubInstallationClient

func GetCachedGithubInstallationClient(cacheKey int64, config GithubConfig) (*GithubInstallationClient, error)

func NewInstallationClient

func NewInstallationClient(
	installationId int64,
	cfg GithubConfig,
) (*GithubInstallationClient, error)

func (*GithubInstallationClient) GetExtendedTeamMember

func (gic *GithubInstallationClient) GetExtendedTeamMember(
	ctx context.Context,
	teamMember Member,
) (*ExtendedMember, error)

func (*GithubInstallationClient) GetTeamMembers

func (gic *GithubInstallationClient) GetTeamMembers(
	ctx context.Context,
	organizationName string,
	teamSlug string,
	teamName string,
	listOptions *ListOptions,
) (Members, error)

func (*GithubInstallationClient) GetTeams

func (gic *GithubInstallationClient) GetTeams(
	ctx context.Context,
	organizationName string,
	listOptions *ListOptions,
) (Teams, error)

type ListOptions

type ListOptions struct {
	PerPage int
	//Limit to max amount of pages we want to visit
	MaxPages int
}

type Member

type Member struct {
	Login *string `json:"login,omitempty"`
	ID    *int64  `json:"id,omitempty"`
}

type Members

type Members []Member

type Team

type Team struct {
	Name *string `json:"name,omitempty"`
	ID   *int64  `json:"id,omitempty"`
	Slug *string `json:"slug,omitempty"`
}

type Teams

type Teams []Team

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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