play

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Copyright 2020 WILDCARD

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. Created on 24/01/2021

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. Created on 24/01/2021

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddWatcher

func AddWatcher(name string, f func(logr.Logger, types.NamespacedName, int64, int64, string, string, string, string) error)

AddWatcher inserts method to scans map

func Play

func Play(c *gin.Context)

Play gets the play payload and determine the resource to scan

Types

type Commit

type Commit struct {
	// SHA contains git commit SHA
	SHA string `json:"sha,omitempty"`

	// Ref contains git commit reference
	Ref string `json:"ref,omitempty"`

	// Message contains commit message
	Message string `json:"message,omitempty"`
}

Commit contains all git information

type Interface added in v0.1.1

type Interface interface {
	Scan()
}

type Object

type Object struct {
	Kind           string               `json:"kind,omitempty"`
	NamespacedName types.NamespacedName `json:"namespaced_name,omitempty"`
}

type Payload

type Payload struct {
	Object     *Object `json:"object,omitempty"`
	ProjectID  int64   `json:"project_id,omitempty"`
	PipelineID int64   `json:"pipeline_id,omitempty"`
	RepoURL    string  `json:"repo_url,omitempty"`
	Commit     Commit  `json:"ref,omitempty"`
	Stack      Stack   `json:"stack,omitempty"`
	Status     string  `json:"status,omitempty"`
}

type Stack

type Stack struct {
	// Language contains the repository language
	Language string `json:"language,omitempty"`

	// Package contains the package use in application
	Package string `json:"package,omitempty"`
}

Stack contains the language and package of the source

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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