Documentation ¶
Index ¶
- Variables
- type GitLabConnection
- func (c *GitLabConnection) ClearCachedList()
- func (c *GitLabConnection) EnqueueProjectCache()
- func (c *GitLabConnection) GetArchive(kind, uuid, ref string) ([]byte, error)
- func (c *GitLabConnection) GetCachedList() ([]string, time.Time)
- func (c *GitLabConnection) GetRepo(kind, uuid string) (*GitLabRepo, error)
- func (c *GitLabConnection) GetRepoList(kind string) ([]*GitLabRepo, error)
- type GitLabRepo
- type JsonMap
- func (m *JsonMap) GetInterface(key string, def interface{}) (interface{}, error)
- func (m *JsonMap) GetListInterface(key string, def *[]interface{}) (*[]interface{}, error)
- func (m *JsonMap) GetMapInterface(key string, def map[string]interface{}) (*map[string]interface{}, error)
- func (m *JsonMap) GetString(key string) (string, error)
- type Tag
Constants ¶
This section is empty.
Variables ¶
var ( // predefined constants KindComposer = "composer" KindNpm = "npm" )
Functions ¶
This section is empty.
Types ¶
type GitLabConnection ¶
type GitLabConnection struct {
// contains filtered or unexported fields
}
GitLabConnection represent connection to GitLab
func NewConnectionFromRequest ¶
func NewConnectionFromRequest(r *http.Request) (*GitLabConnection, error)
NewConnectionFromRequest - create new GitLabConnection for a given request
func (*GitLabConnection) ClearCachedList ¶
func (c *GitLabConnection) ClearCachedList()
ClearCachedList - force remove projectList cache key for current token
func (*GitLabConnection) EnqueueProjectCache ¶
func (c *GitLabConnection) EnqueueProjectCache()
EnqueueProjectCache - trigger projectList load code for current token, but if cache is exists, do nothing. Function will run in background.
func (*GitLabConnection) GetArchive ¶
func (c *GitLabConnection) GetArchive(kind, uuid, ref string) ([]byte, error)
GetArchive - get binary buffer (tar.gz) for whole project by ref
func (*GitLabConnection) GetCachedList ¶
func (c *GitLabConnection) GetCachedList() ([]string, time.Time)
return www items values for list of cached projects
func (*GitLabConnection) GetRepo ¶
func (c *GitLabConnection) GetRepo(kind, uuid string) (*GitLabRepo, error)
GetRepo - return package repository
func (*GitLabConnection) GetRepoList ¶
func (c *GitLabConnection) GetRepoList(kind string) ([]*GitLabRepo, error)
GetRepoList - return list of package repositories
type GitLabRepo ¶
type GitLabRepo struct { Project *gitlab.Project UUID string TagList []Tag Metadata *JsonMap MetadataLock *sync.RWMutex }
Represent project/package repository
type JsonMap ¶
type JsonMap map[string]interface{}
func (*JsonMap) GetInterface ¶
GetInterface - helper method to extract any value from underlying map
func (*JsonMap) GetListInterface ¶
GetListInterface - helper method to extract array/slice from underlying map