Documentation
¶
Index ¶
- Variables
- func AssertF3Equals(t tests.TestingT, a, b *ForgeRoot, dir string)
- func NewForgeContainer[ForgeContainer any, Parent any, ...](root *ForgeRoot, parent ParentPtr, providerName string) ForgeContainerPtr
- func NewForgeElement[ForgeElement any, Parent any, ...](root *ForgeRoot, parent ParentPtr, provider common.ProviderInterface) ForgeElementPtr
- type Fixture
- func (o *Fixture) Assign(ctx context.Context, path format.ForgePath)
- func (o *Fixture) DeleteAppend(fun func())
- func (o *Fixture) NewAdminForge()
- func (o *Fixture) NewAsset()
- func (o *Fixture) NewCommentReaction()
- func (o *Fixture) NewIssue()
- func (o *Fixture) NewIssueComment(exemplar *format.Comment)
- func (o *Fixture) NewIssueReaction()
- func (o *Fixture) NewLabel()
- func (o *Fixture) NewMilestone()
- func (o *Fixture) NewProject()
- func (o *Fixture) NewPullRequest()
- func (o *Fixture) NewPullRequestComment()
- func (o *Fixture) NewRelease()
- func (o *Fixture) NewRepository()
- func (o *Fixture) NewReview()
- func (o *Fixture) NewTopic()
- func (o *Fixture) NewUser(id int64)
- type FixtureForgeFactory
- type FixtureForgeFactoryFun
- type Forge
- func (o *Forge) Apply(ctx context.Context, opts *common.ApplyOptions)
- func (o *Forge) GetParentObjects() []common.ContainerObjectInterface
- func (o *Forge) Init(root *ForgeRoot)
- func (o *Forge) Mirror(ctx context.Context, origin common.ContainerElementInterface, ...)
- func (o *Forge) Walk(ctx context.Context, opts *common.WalkOptions)
- type ForgeAsset
- type ForgeAssets
- type ForgeCommentReaction
- type ForgeCommentReactions
- type ForgeContainer
- func (o *ForgeContainer[ForgeElement, Parent, Format, ForgeElementPtr, ParentPtr, FormatPtr]) FromFormat(ctx context.Context, format FormatPtr) common.ContainerElementInterface
- func (o *ForgeContainer[ForgeElement, Parent, Format, ForgeElementPtr, ParentPtr, FormatPtr]) GetFromFormat(ctx context.Context, format format.Interface) ForgeElementPtr
- func (o *ForgeContainer[ForgeElement, Parent, Format, ForgeElementPtr, ParentPtr, FormatPtr]) GetWithType(ctx context.Context, exemplar common.ContainerElementInterface) ForgeElementPtr
- func (o *ForgeContainer[ForgeElement, Parent, Format, ForgeElementPtr, ParentPtr, FormatPtr]) Init(self common.NodeInterface, root *ForgeRoot, parent ParentPtr, ...)
- func (o *ForgeContainer[ForgeElement, Parent, Format, ForgeElementPtr, ParentPtr, FormatPtr]) NewFormat(id int64) format.Interface
- func (o *ForgeContainer[ForgeElement, Parent, Format, ForgeElementPtr, ParentPtr, FormatPtr]) ToFormatWithType(ctx context.Context, element common.ContainerElementInterface) FormatPtr
- func (o *ForgeContainer[ForgeElement, Parent, Format, ForgeElementPtr, ParentPtr, FormatPtr]) Upsert(ctx context.Context, format FormatPtr) ForgeElementPtr
- type ForgeElement
- func (o *ForgeElement[Parent, ParentPtr]) Init(self common.NodeInterface, root *ForgeRoot, parent ParentPtr, ...)
- func (o *ForgeElement[Parent, ParentPtr]) Mirror(ctx context.Context, other common.ContainerElementInterface, ...)
- func (o *ForgeElement[Parent, ParentPtr]) NewFormat(int64) format.Interface
- type ForgeElementConstraint
- type ForgeIssue
- type ForgeIssueComment
- type ForgeIssueComments
- type ForgeIssueReaction
- type ForgeIssueReactions
- type ForgeIssues
- type ForgeLabel
- type ForgeLabels
- type ForgeMilestone
- type ForgeMilestones
- type ForgeProject
- type ForgeProjects
- type ForgePullRequest
- type ForgePullRequestComment
- type ForgePullRequestComments
- type ForgePullRequests
- type ForgeRelease
- type ForgeReleases
- type ForgeRepositories
- type ForgeRepository
- type ForgeReview
- type ForgeReviews
- type ForgeRoot
- func FixtureNewF3Forge(t tests.TestingT, logger *config_types.Logger, user *format.User, ...) *ForgeRoot
- func FixtureNewForgejoForge(t tests.TestingT, logger *config_types.Logger, user *format.User, ...) *ForgeRoot
- func FixtureNewGitLabForge(t tests.TestingT, logger *config_types.Logger, user *format.User, ...) *ForgeRoot
- func NewForgeRoot(driver common.DriverInterface, options config_types.OptionsInterface) *ForgeRoot
- func (o *ForgeRoot) Apply(ctx context.Context, opts *common.ApplyOptions)
- func (o *ForgeRoot) GetDirectory() string
- func (o *ForgeRoot) GetDriver() common.DriverInterface
- func (o *ForgeRoot) GetFeatures() config_types.Features
- func (o *ForgeRoot) GetLogger() *config_types.Logger
- func (o *ForgeRoot) GetPerPage() int
- func (o *ForgeRoot) Init()
- func (o *ForgeRoot) Rollback()
- func (o *ForgeRoot) SetLogger(logger *config_types.Logger)
- func (o *ForgeRoot) Walk(ctx context.Context, opts *common.WalkOptions)
- type ForgeTopic
- type ForgeTopics
- type ForgeUser
- type ForgeUsers
- type FormatConstraint
- type NewForgeContainerConstraint
- type NewForgeElementConstraint
- type NewParentConstraint
- type ParentConstraint
Constants ¶
This section is empty.
Variables ¶
View Source
var ( FixtureGitLabFactory = FixtureForgeFactory{Fun: FixtureNewGitLabForge, AdminRequired: true} FixtureForgejoFactory = FixtureForgeFactory{Fun: FixtureNewForgejoForge, AdminRequired: true} FixtureF3Factory = FixtureForgeFactory{Fun: FixtureNewF3Forge, AdminRequired: false} )
View Source
var FixtureAdminUser *format.User = &format.User{
UserName: "root",
Password: "Wrobyak4",
}
View Source
var FixtureForgeFactories = map[string]FixtureForgeFactory{ "gitlab": FixtureGitLabFactory, "forgejo": FixtureForgejoFactory, "f3": FixtureF3Factory, }
Functions ¶
func NewForgeContainer ¶
func NewForgeContainer[ ForgeContainer any, Parent any, ForgeContainerPtr NewForgeContainerConstraint[ForgeContainer, ParentPtr], ParentPtr NewParentConstraint[Parent], ]( root *ForgeRoot, parent ParentPtr, providerName string, ) ForgeContainerPtr
func NewForgeElement ¶
func NewForgeElement[ ForgeElement any, Parent any, ForgeElementPtr NewForgeElementConstraint[ForgeElement, ParentPtr], ParentPtr NewParentConstraint[Parent], ]( root *ForgeRoot, parent ParentPtr, provider common.ProviderInterface, ) ForgeElementPtr
Types ¶
type Fixture ¶
type Fixture struct { ForgeRoot *ForgeRoot Forge *Forge Asset *ForgeAsset AssetFormat *format.ReleaseAsset PullRequestComment *ForgePullRequestComment PullRequestCommentFormat *format.Comment IssueComment *ForgeIssueComment IssueCommentFormat *format.Comment CommentReaction *ForgeCommentReaction CommentReactionFormat *format.Reaction IssueReaction *ForgeIssueReaction IssueReactionFormat *format.Reaction Issue *ForgeIssue IssueFormat *format.Issue Label *ForgeLabel LabelFormat *format.Label Milestone *ForgeMilestone MilestoneFormat *format.Milestone Project *ForgeProject ProjectFormat *format.Project PullRequest *ForgePullRequest PullRequestFormat *format.PullRequest Release *ForgeRelease ReleaseFormat *format.Release Repository *ForgeRepository RepositoryFormat *format.Repository FixtureRepositoryFormat *format.Repository RepositoryHelper *tests.RepositoryTestHelper Review *ForgeReview ReviewFormat *format.Review Topic *ForgeTopic TopicFormat *format.Topic UserIsAdmin bool User *ForgeUser UserFormat *format.User // contains filtered or unexported fields }
func NewFixture ¶
func NewFixture(t tests.TestingT, forgeFactory FixtureForgeFactory) *Fixture
func (*Fixture) DeleteAppend ¶
func (o *Fixture) DeleteAppend(fun func())
func (*Fixture) NewAdminForge ¶
func (o *Fixture) NewAdminForge()
func (*Fixture) NewCommentReaction ¶
func (o *Fixture) NewCommentReaction()
func (*Fixture) NewIssueComment ¶
func (*Fixture) NewIssueReaction ¶
func (o *Fixture) NewIssueReaction()
func (*Fixture) NewMilestone ¶
func (o *Fixture) NewMilestone()
func (*Fixture) NewProject ¶
func (o *Fixture) NewProject()
func (*Fixture) NewPullRequest ¶
func (o *Fixture) NewPullRequest()
func (*Fixture) NewPullRequestComment ¶
func (o *Fixture) NewPullRequestComment()
func (*Fixture) NewRelease ¶
func (o *Fixture) NewRelease()
func (*Fixture) NewRepository ¶
func (o *Fixture) NewRepository()
type FixtureForgeFactory ¶
type FixtureForgeFactory struct { Fun FixtureForgeFactoryFun AdminRequired bool }
type FixtureForgeFactoryFun ¶
type Forge ¶
type Forge struct { ForgeElement[common.ContainerElement, *common.ContainerElement] Users *ForgeUsers }
func (*Forge) GetParentObjects ¶
func (o *Forge) GetParentObjects() []common.ContainerObjectInterface
func (*Forge) Mirror ¶
func (o *Forge) Mirror(ctx context.Context, origin common.ContainerElementInterface, options *common.MirrorOptions)
type ForgeAsset ¶
type ForgeAsset struct { ForgeElement[ForgeRelease, *ForgeRelease] }
type ForgeAssets ¶
type ForgeAssets struct { ForgeContainer[ForgeAsset, ForgeRelease, format.ReleaseAsset, *ForgeAsset, *ForgeRelease, *format.ReleaseAsset] }
func (*ForgeAssets) Mirror ¶
func (o *ForgeAssets) Mirror(ctx context.Context, other common.ContainerInterface, options *common.MirrorOptions)
type ForgeCommentReaction ¶
type ForgeCommentReaction struct { ForgeElement[ForgeIssueComment, *ForgeIssueComment] }
type ForgeCommentReactions ¶
type ForgeCommentReactions struct { ForgeContainer[ForgeCommentReaction, ForgeIssueComment, format.Reaction, *ForgeCommentReaction, *ForgeIssueComment, *format.Reaction] }
func (*ForgeCommentReactions) Mirror ¶
func (o *ForgeCommentReactions) Mirror(ctx context.Context, other common.ContainerInterface, options *common.MirrorOptions)
type ForgeContainer ¶
type ForgeContainer[ ForgeElement any, Parent any, Format any, ForgeElementPtr ForgeElementConstraint[ForgeElement, ParentPtr], ParentPtr ParentConstraint[Parent], FormatPtr FormatConstraint[Format], ] struct { common.Container }
func (*ForgeContainer[ForgeElement, Parent, Format, ForgeElementPtr, ParentPtr, FormatPtr]) FromFormat ¶
func (o *ForgeContainer[ForgeElement, Parent, Format, ForgeElementPtr, ParentPtr, FormatPtr]) FromFormat(ctx context.Context, format FormatPtr) common.ContainerElementInterface
func (*ForgeContainer[ForgeElement, Parent, Format, ForgeElementPtr, ParentPtr, FormatPtr]) GetFromFormat ¶
func (o *ForgeContainer[ForgeElement, Parent, Format, ForgeElementPtr, ParentPtr, FormatPtr]) GetFromFormat(ctx context.Context, format format.Interface) ForgeElementPtr
func (*ForgeContainer[ForgeElement, Parent, Format, ForgeElementPtr, ParentPtr, FormatPtr]) GetWithType ¶
func (o *ForgeContainer[ForgeElement, Parent, Format, ForgeElementPtr, ParentPtr, FormatPtr]) GetWithType(ctx context.Context, exemplar common.ContainerElementInterface) ForgeElementPtr
func (*ForgeContainer[ForgeElement, Parent, Format, ForgeElementPtr, ParentPtr, FormatPtr]) Init ¶
func (o *ForgeContainer[ForgeElement, Parent, Format, ForgeElementPtr, ParentPtr, FormatPtr]) Init(self common.NodeInterface, root *ForgeRoot, parent ParentPtr, providerName string)
func (*ForgeContainer[ForgeElement, Parent, Format, ForgeElementPtr, ParentPtr, FormatPtr]) NewFormat ¶
func (o *ForgeContainer[ForgeElement, Parent, Format, ForgeElementPtr, ParentPtr, FormatPtr]) NewFormat(id int64) format.Interface
func (*ForgeContainer[ForgeElement, Parent, Format, ForgeElementPtr, ParentPtr, FormatPtr]) ToFormatWithType ¶
func (o *ForgeContainer[ForgeElement, Parent, Format, ForgeElementPtr, ParentPtr, FormatPtr]) ToFormatWithType(ctx context.Context, element common.ContainerElementInterface) FormatPtr
func (*ForgeContainer[ForgeElement, Parent, Format, ForgeElementPtr, ParentPtr, FormatPtr]) Upsert ¶
func (o *ForgeContainer[ForgeElement, Parent, Format, ForgeElementPtr, ParentPtr, FormatPtr]) Upsert(ctx context.Context, format FormatPtr) ForgeElementPtr
type ForgeElement ¶
type ForgeElement[ Parent any, ParentPtr ParentConstraint[Parent], ] struct { common.ContainerElement }
func (*ForgeElement[Parent, ParentPtr]) Init ¶
func (o *ForgeElement[Parent, ParentPtr]) Init(self common.NodeInterface, root *ForgeRoot, parent ParentPtr, provider common.ProviderInterface)
func (*ForgeElement[Parent, ParentPtr]) Mirror ¶
func (o *ForgeElement[Parent, ParentPtr]) Mirror(ctx context.Context, other common.ContainerElementInterface, options *common.MirrorOptions)
type ForgeElementConstraint ¶
type ForgeElementConstraint[ForgeElement any, ParentPtr any] interface { *ForgeElement common.ContainerElementInterface Init(common.NodeInterface, *ForgeRoot, ParentPtr, common.ProviderInterface) }
type ForgeIssue ¶
type ForgeIssue struct { ForgeElement[ForgeProject, *ForgeProject] Comments *ForgeIssueComments Reactions *ForgeIssueReactions }
func (*ForgeIssue) Init ¶
func (o *ForgeIssue) Init(self common.NodeInterface, root *ForgeRoot, project *ForgeProject, provider common.ProviderInterface)
func (*ForgeIssue) Mirror ¶
func (o *ForgeIssue) Mirror(ctx context.Context, other common.ContainerElementInterface, options *common.MirrorOptions)
type ForgeIssueComment ¶
type ForgeIssueComment struct { ForgeElement[ForgeIssue, *ForgeIssue] Reactions *ForgeCommentReactions }
func (*ForgeIssueComment) Init ¶
func (o *ForgeIssueComment) Init(self common.NodeInterface, root *ForgeRoot, issue *ForgeIssue, provider common.ProviderInterface)
func (*ForgeIssueComment) Mirror ¶
func (o *ForgeIssueComment) Mirror(ctx context.Context, other common.ContainerElementInterface, options *common.MirrorOptions)
type ForgeIssueComments ¶
type ForgeIssueComments struct { ForgeContainer[ForgeIssueComment, ForgeIssue, format.Comment, *ForgeIssueComment, *ForgeIssue, *format.Comment] }
func (*ForgeIssueComments) Mirror ¶
func (o *ForgeIssueComments) Mirror(ctx context.Context, other common.ContainerInterface, options *common.MirrorOptions)
type ForgeIssueReaction ¶
type ForgeIssueReaction struct { ForgeElement[ForgeIssue, *ForgeIssue] }
type ForgeIssueReactions ¶
type ForgeIssueReactions struct { ForgeContainer[ForgeIssueReaction, ForgeIssue, format.Reaction, *ForgeIssueReaction, *ForgeIssue, *format.Reaction] }
func (*ForgeIssueReactions) Mirror ¶
func (o *ForgeIssueReactions) Mirror(ctx context.Context, other common.ContainerInterface, options *common.MirrorOptions)
type ForgeIssues ¶
type ForgeIssues struct { ForgeContainer[ForgeIssue, ForgeProject, format.Issue, *ForgeIssue, *ForgeProject, *format.Issue] }
func (*ForgeIssues) Mirror ¶
func (o *ForgeIssues) Mirror(ctx context.Context, other common.ContainerInterface, options *common.MirrorOptions)
type ForgeLabel ¶
type ForgeLabel struct { ForgeElement[ForgeProject, *ForgeProject] }
type ForgeLabels ¶
type ForgeLabels struct { ForgeContainer[ForgeLabel, ForgeProject, format.Label, *ForgeLabel, *ForgeProject, *format.Label] }
func (*ForgeLabels) Mirror ¶
func (o *ForgeLabels) Mirror(ctx context.Context, other common.ContainerInterface, options *common.MirrorOptions)
type ForgeMilestone ¶
type ForgeMilestone struct { ForgeElement[ForgeProject, *ForgeProject] }
type ForgeMilestones ¶
type ForgeMilestones struct { ForgeContainer[ForgeMilestone, ForgeProject, format.Milestone, *ForgeMilestone, *ForgeProject, *format.Milestone] }
func (*ForgeMilestones) Mirror ¶
func (o *ForgeMilestones) Mirror(ctx context.Context, other common.ContainerInterface, options *common.MirrorOptions)
type ForgeProject ¶
type ForgeProject struct { ForgeElement[ForgeUser, *ForgeUser] Issues *ForgeIssues PullRequests *ForgePullRequests Milestones *ForgeMilestones Repositories *ForgeRepositories Releases *ForgeReleases Topics *ForgeTopics Labels *ForgeLabels }
func (*ForgeProject) Init ¶
func (o *ForgeProject) Init(self common.NodeInterface, root *ForgeRoot, user *ForgeUser, provider common.ProviderInterface)
func (*ForgeProject) Mirror ¶
func (o *ForgeProject) Mirror(ctx context.Context, other common.ContainerElementInterface, options *common.MirrorOptions)
type ForgeProjects ¶
type ForgeProjects struct { ForgeContainer[ForgeProject, ForgeUser, format.Project, *ForgeProject, *ForgeUser, *format.Project] }
type ForgePullRequest ¶
type ForgePullRequest struct { ForgeElement[ForgeProject, *ForgeProject] Comments *ForgePullRequestComments Reviews *ForgeReviews }
func (*ForgePullRequest) Init ¶
func (o *ForgePullRequest) Init(self common.NodeInterface, root *ForgeRoot, project *ForgeProject, provider common.ProviderInterface)
func (*ForgePullRequest) Mirror ¶
func (o *ForgePullRequest) Mirror(ctx context.Context, other common.ContainerElementInterface, options *common.MirrorOptions)
type ForgePullRequestComment ¶
type ForgePullRequestComment struct { ForgeElement[ForgePullRequest, *ForgePullRequest] }
type ForgePullRequestComments ¶
type ForgePullRequestComments struct { ForgeContainer[ForgePullRequestComment, ForgePullRequest, format.Comment, *ForgePullRequestComment, *ForgePullRequest, *format.Comment] }
type ForgePullRequests ¶
type ForgePullRequests struct { ForgeContainer[ForgePullRequest, ForgeProject, format.PullRequest, *ForgePullRequest, *ForgeProject, *format.PullRequest] }
func (*ForgePullRequests) Mirror ¶
func (o *ForgePullRequests) Mirror(ctx context.Context, other common.ContainerInterface, options *common.MirrorOptions)
type ForgeRelease ¶
type ForgeRelease struct { ForgeElement[ForgeProject, *ForgeProject] Assets *ForgeAssets }
func (*ForgeRelease) Init ¶
func (o *ForgeRelease) Init(self common.NodeInterface, root *ForgeRoot, project *ForgeProject, provider common.ProviderInterface)
func (*ForgeRelease) Mirror ¶
func (o *ForgeRelease) Mirror(ctx context.Context, other common.ContainerElementInterface, options *common.MirrorOptions)
type ForgeReleases ¶
type ForgeReleases struct { ForgeContainer[ForgeRelease, ForgeProject, format.Release, *ForgeRelease, *ForgeProject, *format.Release] }
func (*ForgeReleases) Mirror ¶
func (o *ForgeReleases) Mirror(ctx context.Context, other common.ContainerInterface, options *common.MirrorOptions)
type ForgeRepositories ¶
type ForgeRepositories struct { ForgeContainer[ForgeRepository, ForgeProject, format.Repository, *ForgeRepository, *ForgeProject, *format.Repository] }
func (*ForgeRepositories) Mirror ¶
func (o *ForgeRepositories) Mirror(ctx context.Context, other common.ContainerInterface, options *common.MirrorOptions)
type ForgeRepository ¶
type ForgeRepository struct { ForgeElement[ForgeProject, *ForgeProject] }
type ForgeReview ¶
type ForgeReview struct { ForgeElement[ForgePullRequest, *ForgePullRequest] }
type ForgeReviews ¶
type ForgeReviews struct { ForgeContainer[ForgeReview, ForgePullRequest, format.Review, *ForgeReview, *ForgePullRequest, *format.Review] }
type ForgeRoot ¶
type ForgeRoot struct { Forge *Forge // contains filtered or unexported fields }
func FixtureNewF3Forge ¶
func FixtureNewForgejoForge ¶
func FixtureNewGitLabForge ¶
func NewForgeRoot ¶
func NewForgeRoot(driver common.DriverInterface, options config_types.OptionsInterface) *ForgeRoot
func (*ForgeRoot) GetDirectory ¶
func (*ForgeRoot) GetDriver ¶
func (o *ForgeRoot) GetDriver() common.DriverInterface
func (*ForgeRoot) GetFeatures ¶
func (o *ForgeRoot) GetFeatures() config_types.Features
func (*ForgeRoot) GetLogger ¶
func (o *ForgeRoot) GetLogger() *config_types.Logger
func (*ForgeRoot) GetPerPage ¶
func (*ForgeRoot) SetLogger ¶
func (o *ForgeRoot) SetLogger(logger *config_types.Logger)
type ForgeTopic ¶
type ForgeTopic struct { ForgeElement[ForgeProject, *ForgeProject] }
type ForgeTopics ¶
type ForgeTopics struct { ForgeContainer[ForgeTopic, ForgeProject, format.Topic, *ForgeTopic, *ForgeProject, *format.Topic] }
type ForgeUser ¶
type ForgeUser struct { ForgeElement[Forge, *Forge] Projects *ForgeProjects }
func (*ForgeUser) Init ¶
func (o *ForgeUser) Init(self common.NodeInterface, root *ForgeRoot, parent *Forge, provider common.ProviderInterface)
func (*ForgeUser) Mirror ¶
func (o *ForgeUser) Mirror(ctx context.Context, other common.ContainerElementInterface, options *common.MirrorOptions)
type ForgeUsers ¶
type FormatConstraint ¶
type NewForgeContainerConstraint ¶
type NewForgeContainerConstraint[ForgeContainer any, ParentPtr any] interface { *ForgeContainer common.NodeInterface Init(common.NodeInterface, *ForgeRoot, ParentPtr, string) }
type NewForgeElementConstraint ¶
type NewForgeElementConstraint[ForgeElement any, ParentPtr any] interface { *ForgeElement common.NodeInterface Init(common.NodeInterface, *ForgeRoot, ParentPtr, common.ProviderInterface) }
type NewParentConstraint ¶
type NewParentConstraint[Parent any] interface { *Parent common.NodeInterface }
type ParentConstraint ¶
type ParentConstraint[Parent any] interface { *Parent common.NodeInterface }
Source Files
¶
Click to show internal directories.
Click to hide internal directories.