repository

package
v0.0.0-...-8bea463 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AllRepositoryOrderField = []RepositoryOrderField{
	RepositoryOrderFieldName,
}

Functions

func NewLoaderContext

func NewLoaderContext(ctx context.Context, dbConn *pgxpool.Pool) context.Context

func RemoveFromTeam

func RemoveFromTeam(ctx context.Context, input RemoveRepositoryFromTeamInput) error

Types

type AddRepositoryToTeamInput

type AddRepositoryToTeamInput struct {
	TeamSlug       slug.Slug `json:"teamSlug"`
	RepositoryName string    `json:"repositoryName"`
}

type AddRepositoryToTeamPayload

type AddRepositoryToTeamPayload struct {
	Repository *Repository `json:"repository"`
}

type RemoveRepositoryFromTeamInput

type RemoveRepositoryFromTeamInput struct {
	TeamSlug       slug.Slug `json:"teamSlug"`
	RepositoryName string    `json:"repositoryName"`
}

type RemoveRepositoryFromTeamPayload

type RemoveRepositoryFromTeamPayload struct {
	Success bool `json:"success"`
}

type Repository

type Repository struct {
	Name     string    `json:"name"`
	TeamSlug slug.Slug `json:"-"`
}

func AddToTeam

func AddToTeam(ctx context.Context, input AddRepositoryToTeamInput) (*Repository, error)

func (Repository) ID

func (r Repository) ID() ident.Ident

func (Repository) IsNode

func (Repository) IsNode()

type RepositoryAddedActivityLogEntry

type RepositoryAddedActivityLogEntry struct {
	activitylog.GenericActivityLogEntry
}

type RepositoryConnection

type RepositoryConnection = pagination.Connection[*Repository]

func ListForTeam

func ListForTeam(ctx context.Context, teamSlug slug.Slug, page *pagination.Pagination, orderBy *RepositoryOrder, filter *TeamRepositoryFilter) (*RepositoryConnection, error)

type RepositoryEdge

type RepositoryEdge = pagination.Edge[*Repository]

type RepositoryOrder

type RepositoryOrder struct {
	// The field to order items by.
	Field RepositoryOrderField `json:"field"`
	// The direction to order items by.
	Direction model.OrderDirection `json:"direction"`
}

Ordering options when fetching repositories.

func (*RepositoryOrder) String

func (o *RepositoryOrder) String() string

type RepositoryOrderField

type RepositoryOrderField string
const (
	// Order repositories by name.
	RepositoryOrderFieldName RepositoryOrderField = "NAME"
)

func (RepositoryOrderField) IsValid

func (e RepositoryOrderField) IsValid() bool

func (RepositoryOrderField) MarshalGQL

func (e RepositoryOrderField) MarshalGQL(w io.Writer)

func (RepositoryOrderField) String

func (e RepositoryOrderField) String() string

func (*RepositoryOrderField) UnmarshalGQL

func (e *RepositoryOrderField) UnmarshalGQL(v interface{}) error

type RepositoryRemovedActivityLogEntry

type RepositoryRemovedActivityLogEntry struct {
	activitylog.GenericActivityLogEntry
}

type TeamRepositoryFilter

type TeamRepositoryFilter struct {
	Name *string `json:"name"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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