github.com/drone/go-convert@v0.0.0-20240307072510-6bd371c65e61/convert/jenkins/const.go (about) 1 // Copyright 2022 Harness, Inc. 2 // 3 // Licensed under the Apache License, Version 2.0 (the "License"); 4 // you may not use this file except in compliance with the License. 5 // You may obtain a copy of the License at 6 // 7 // http://www.apache.org/licenses/LICENSE-2.0 8 // 9 // Unless required by applicable law or agreed to in writing, software 10 // distributed under the License is distributed on an "AS IS" BASIS, 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 // See the License for the specific language governing permissions and 13 // limitations under the License. 14 15 package jenkins 16 17 // Format defines the intermeditate format. 18 type Format int 19 20 // String returns the format as a string. 21 func (f Format) String() string { 22 switch f { 23 case FromGithub: 24 return "GitHub" 25 case FromGitlab: 26 return "GitLab" 27 case FromDrone: 28 return "Drone" 29 default: 30 return "GitHub" 31 } 32 } 33 34 const ( 35 FromGithub Format = iota 36 FromGitlab 37 FromDrone 38 )