gitlab

package
v0.0.0-...-d7fecdb Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2023 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init(cfg *Config) error

func NewRepoFile

func NewRepoFile() platform.RepoFile

func NewRepositoryService

func NewRepositoryService(v UserInfo) platform.Repository

func NewUserSerivce

func NewUserSerivce() platform.User

Types

type Action

type Action struct {
	Action   string `json:"action"     required:"true"`
	FilePath string `json:"file_path"  required:"true"`
}

type CommitInfo

type CommitInfo struct {
	Branch      string `json:"branch"           required:"true"`
	Message     string `json:"commit_message"   required:"true"`
	AuthorName  string `json:"author_name,omitempty"`
	AuthorEmail string `json:"author_email,omitempty"`
}

type Commits

type Commits struct {
	CommitInfo

	Actions []Action `json:"actions"   required:"true"`
}

type Config

type Config struct {
	OBS             OBSConfig `json:"obs"              required:"true"`
	LFSPath         string    `json:"lfs_path"         required:"true"`
	Endpoint        string    `json:"endpoint"         required:"true"`
	RootToken       string    `json:"root_token"       required:"true"`
	GraphqlEndpoint string    `json:"graphql_endpoint" required:"true"`
	DefaultBranch   string    `json:"default_branch"`
	DownloadExpiry  int       `json:"download_expiry"`

	// MaxFileCount specifies the count of file to operate once.
	MaxFileCount int `json:"max_file_count"`
}

func (*Config) SetDefault

func (cfg *Config) SetDefault()

type FileCreateOption

type FileCreateOption struct {
	CommitInfo

	Content  string `json:"content"`
	Encoding string `json:"encoding,omitempty"`
}

type OBSConfig

type OBSConfig struct {
	Bucket    string `json:"bucket"     required:"true"`
	Endpoint  string `json:"endpoint"   required:"true"`
	AccessKey string `json:"access_key" required:"true"`
	SecretKey string `json:"secret_key" required:"true"`
}

type UserInfo

type UserInfo struct {
	Token     string
	Namespace string
}

Jump to

Keyboard shortcuts

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