f3

package
v3.3.1 Latest Latest
Warning

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

Go to latest
Published: May 18, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KindAsset          = f3.ResourceAsset
	KindAssets         = f3.ResourceAssets
	KindComment        = f3.ResourceComment
	KindComments       = f3.ResourceComments
	KindForge          = f3.ResourceForge
	KindIssue          = f3.ResourceIssue
	KindIssues         = f3.ResourceIssues
	KindLabel          = f3.ResourceLabel
	KindLabels         = f3.ResourceLabels
	KindMilestone      = f3.ResourceMilestone
	KindMilestones     = f3.ResourceMilestones
	KindOrganization   = f3.ResourceOrganization
	KindOrganizations  = f3.ResourceOrganizations
	KindProject        = f3.ResourceProject
	KindProjects       = f3.ResourceProjects
	KindPullRequest    = f3.ResourcePullRequest
	KindPullRequests   = f3.ResourcePullRequests
	KindReaction       = f3.ResourceReaction
	KindReactions      = f3.ResourceReactions
	KindRelease        = f3.ResourceRelease
	KindReleases       = f3.ResourceReleases
	KindRepository     = f3.ResourceRepository
	KindRepositories   = f3.ResourceRepositories
	KindReview         = f3.ResourceReview
	KindReviews        = f3.ResourceReviews
	KindReviewComment  = f3.ResourceReviewComment
	KindReviewComments = f3.ResourceReviewComments
	KindTopic          = f3.ResourceTopic
	KindTopics         = f3.ResourceTopics
	KindUser           = f3.ResourceUser
	KindUsers          = f3.ResourceUsers
)

Variables

View Source
var OrganizationsPath = generic.NewPathFromString("/forge/organizations")
View Source
var TopicsPath = generic.NewPathFromString("/forge/topics")
View Source
var UsersPath = generic.NewPathFromString("/forge/users")

Functions

func ConvertListed

func ConvertListed(ctx context.Context, node generic.NodeInterface, nativeChildren ...any) generic.ChildrenSlice

func ConvertNativeChild

func ConvertNativeChild(ctx context.Context, tree generic.TreeInterface, parent generic.NodeInterface, kind generic.Kind, nativeChild any) generic.NodeInterface

func ConvertToAny

func ConvertToAny[T any](s ...T) []any

func GetCommentID

func GetCommentID(node generic.NodeInterface) int64

func GetCommentable

func GetCommentable(node generic.NodeInterface) generic.NodeInterface

func GetCommentableID

func GetCommentableID(node generic.NodeInterface) int64

func GetFirstFormat

func GetFirstFormat[T f3.Interface](node generic.NodeInterface) T

func GetFirstNodeKind

func GetFirstNodeKind(node generic.NodeInterface, kind ...generic.Kind) generic.NodeInterface

func GetOwnerID

func GetOwnerID(node generic.NodeInterface) int64

func GetOwnerName

func GetOwnerName(node generic.NodeInterface) string

func GetProjectID

func GetProjectID(node generic.NodeInterface) int64

func GetProjectName

func GetProjectName(node generic.NodeInterface) string

func GetPullRequest

func GetPullRequest(node generic.NodeInterface) generic.NodeInterface

func GetPullRequestID

func GetPullRequestID(node generic.NodeInterface) int64

func GetReactionable

func GetReactionable(node generic.NodeInterface) generic.NodeInterface

func GetReactionableID

func GetReactionableID(node generic.NodeInterface) int64

func GetReleaseID

func GetReleaseID(node generic.NodeInterface) int64

func GetReviewComment

func GetReviewComment(node generic.NodeInterface) generic.NodeInterface

func GetReviewCommentID

func GetReviewCommentID(node generic.NodeInterface) int64

func GetReviewID

func GetReviewID(node generic.NodeInterface) int64

func GetUsernameFromID

func GetUsernameFromID(ctx context.Context, tree TreeInterface, id int64) string

func NewIssueLabelReference

func NewIssueLabelReference[T any](id T) *f3.Reference

func NewIssueMilestoneReference

func NewIssueMilestoneReference[T any](id T) *f3.Reference

func NewLabelPathString

func NewLabelPathString[T any](projectPath string, id T) string

func NewLabelReference

func NewLabelReference[T any](projectPath string, id T) *f3.Reference

func NewMilestonePathString

func NewMilestonePathString[T any](projectPath string, id T) string

func NewMilestoneReference

func NewMilestoneReference[T any](projectPath string, id T) *f3.Reference

func NewProjectPathString

func NewProjectPathString[U, P any](owners string, user U, project P) string

func NewProjectReference

func NewProjectReference[U, P any](owners string, user U, project P) *f3.Reference

func NewPullRequestLabelReference

func NewPullRequestLabelReference[T any](id T) *f3.Reference

func NewPullRequestSameRepositoryReference added in v3.1.0

func NewPullRequestSameRepositoryReference() *f3.Reference

func NewRepositoryPath added in v3.1.0

func NewRepositoryPath[T, U any](owners string, owner T, project U) generic.Path

func NewRepositoryPathString added in v3.1.0

func NewRepositoryPathString[T, U any](owners string, owner T, project U) string

func NewRepositoryReference added in v3.1.0

func NewRepositoryReference[T, U any](owners string, owner T, project U) *f3.Reference

func NewTopicPathString

func NewTopicPathString[T any](id T) string

func NewTopicReference

func NewTopicReference[T any](id T) *f3.Reference

func NewUserPathString

func NewUserPathString[T any](id T) string

func NewUserReference

func NewUserReference[T any](id T) *f3.Reference

func RegisterForgeFactory

func RegisterForgeFactory(name string, factory ForgeFactory)

func ResolveProjectReference

func ResolveProjectReference(ctx context.Context, tree generic.TreeInterface, r *f3.Reference) (string, string)

Types

type ForgeDriverInterface

type ForgeDriverInterface interface {
	SetNative(native any)
	GetNativeID() string
	GetHelper() any
}

type ForgeFactory

type ForgeFactory func(tree generic.TreeInterface, options any) generic.TreeDriverInterface

func GetForgeFactory

func GetForgeFactory(name string) ForgeFactory

type Path

type Path interface {
	NodeIDs() []generic.NodeID
	OwnerAndProjectID() (owner, project int64)

	AppendID(id string) Path
	Ignore() Path

	generic.Path
	Root() Path

	Forge() Path
	SetForge() Path

	Assets() Path
	SetAssets() Path

	Comments() Path
	SetComments() Path

	Issues() Path
	SetIssues() Path

	Labels() Path
	SetLabels() Path

	Milestones() Path
	SetMilestones() Path

	Owners() Path
	SetOwners(owners generic.Kind) Path

	Organizations() Path
	SetOrganizations() Path

	Projects() Path
	SetProjects() Path

	PullRequests() Path
	SetPullRequests() Path

	Reactions() Path
	SetReactions() Path

	Releases() Path
	SetReleases() Path

	Repositories() Path
	SetRepositories() Path

	Reviews() Path
	SetReviews() Path

	ReviewComments() Path
	SetReviewComments() Path

	Topics() Path
	SetTopics() Path

	Users() Path
	SetUsers() Path
}

func NewPath

func NewPath(nodes ...generic.NodeInterface) Path

func NewPathFromString

func NewPathFromString(pathString string) Path

func NewTopicPath

func NewTopicPath[T any](id T) Path

func NewUserPath

func NewUserPath[T any](id T) Path

func ToPath

func ToPath(other generic.Path) Path

type PullRequestDriverInterface

type PullRequestDriverInterface interface {
	GetPullRequestHead() string
	GetPullRequestRef() string
	GetPullRequestPushRefs() []string
}

type PullRequestNodeDriverProxyInterface

type PullRequestNodeDriverProxyInterface interface {
	PullRequestDriverInterface
}

type PullRequestNodeInterface

type PullRequestNodeInterface interface {
	generic.NodeInterface
	PullRequestNodeDriverProxyInterface
}

type RepositoryDriverInterface

type RepositoryDriverInterface interface {
	GetRepositoryURL() string
	GetRepositoryPushURL() string
}

type RepositoryNodeDriverProxyInterface

type RepositoryNodeDriverProxyInterface interface {
	RepositoryDriverInterface
}

type RepositoryNodeInterface

type RepositoryNodeInterface interface {
	generic.NodeInterface
	RepositoryNodeDriverProxyInterface
}

type TreeInterface

type TreeInterface interface {
	generic.TreeInterface

	IsContainer(generic.Kind) bool
	NewFormat(kind generic.Kind) f3.Interface
	CreateChild(ctx context.Context, pathString string, set setFunc)
	GetObjectsHelper() objects_helper.Interface
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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