Documentation
¶
Index ¶
Constants ¶
View Source
const ( CL_DEFAULT_ID = ChangelogID("cl_config") GH_DEFAULT_ID = GHSourceID("gh_config") WS_DEFAULT_ID = WorkspaceID("ws_config") )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Changelog ¶
type Changelog struct { WorkspaceID WorkspaceID ID ChangelogID Subdomain Subdomain Domain Domain Title null.String Subtitle null.String LogoSrc null.String LogoLink null.String LogoAlt null.String LogoHeight null.String LogoWidth null.String CreatedAt time.Time GHSource null.Value[GHSource] LocalSource null.Value[LocalSource] }
type ChangelogID ¶
type ChangelogID string
func NewCID ¶
func NewCID() ChangelogID
func ParseCID ¶
func ParseCID(id string) (ChangelogID, error)
func (ChangelogID) String ¶
func (i ChangelogID) String() string
type Domain ¶ added in v0.1.2
type Domain null.String
func DomainFromSQL ¶ added in v0.1.2
func DomainFromSQL(d sql.NullString) Domain
func ParseDomain ¶ added in v0.1.2
strips everything from d except the host
func (Domain) ToNullString ¶ added in v0.1.2
func (d Domain) ToNullString() null.String
type GHSource ¶
type GHSource struct { ID GHSourceID WorkspaceID WorkspaceID Owner string Repo string Path string InstallationID int64 }
type GHSourceID ¶
type GHSourceID string
func NewGHID ¶
func NewGHID() GHSourceID
func ParseGHID ¶
func ParseGHID(id string) (GHSourceID, error)
func (GHSourceID) String ¶
func (i GHSourceID) String() string
type LocalSource ¶
type LocalSource struct {
Path string
}
type Store ¶
type Store interface { GetChangelog(context.Context, WorkspaceID, ChangelogID) (Changelog, error) GetChangelogByDomainOrSubdomain(ctx context.Context, domain Domain, subdomain Subdomain) (Changelog, error) ListChangelogs(context.Context, WorkspaceID) ([]Changelog, error) CreateChangelog(context.Context, Changelog) (Changelog, error) UpdateChangelog(context.Context, WorkspaceID, ChangelogID, UpdateChangelogArgs) (Changelog, error) DeleteChangelog(context.Context, WorkspaceID, ChangelogID) error SetChangelogGHSource(context.Context, WorkspaceID, ChangelogID, GHSourceID) error DeleteChangelogSource(context.Context, WorkspaceID, ChangelogID) error // Workspace GetWorkspace(context.Context, WorkspaceID) (Workspace, error) SaveWorkspace(context.Context, Workspace) (Workspace, error) GetWorkspaceIDByToken(ctx context.Context, token string) (WorkspaceID, error) DeleteWorkspace(context.Context, WorkspaceID) error // Source CreateGHSource(context.Context, GHSource) (GHSource, error) GetGHSource(context.Context, WorkspaceID, GHSourceID) (GHSource, error) ListGHSources(context.Context, WorkspaceID) ([]GHSource, error) DeleteGHSource(context.Context, WorkspaceID, GHSourceID) error }
func NewConfigStore ¶
Create a new store implementation, backed by the config file
func NewSQLiteStore ¶
type Subdomain ¶ added in v0.1.2
type Subdomain string
func NewSubdomain ¶ added in v0.1.2
func ParseSubdomain ¶ added in v0.1.2
func SubdomainFromHost ¶ added in v0.1.2
Returns the subdomain from the host. Returns an error if the host doesn't have a subdomain
func (Subdomain) NullString ¶ added in v0.1.2
func (s Subdomain) NullString() null.String
type UpdateChangelogArgs ¶
type Workspace ¶
type Workspace struct { ID WorkspaceID Name string Token Token }
type WorkspaceID ¶
type WorkspaceID string
func NewWID ¶
func NewWID() WorkspaceID
func ParseWID ¶
func ParseWID(id string) (WorkspaceID, error)
func (WorkspaceID) String ¶
func (i WorkspaceID) String() string
Click to show internal directories.
Click to hide internal directories.