github.com/profzone/eden-framework@v1.0.10/internal/project/drone/platform.go (about)

     1  package drone
     2  
     3  import "github.com/profzone/eden-framework/internal/project/drone/enums"
     4  
     5  type PipelinePlatform struct {
     6  	OS           enums.DroneCiPlatformOs   `yaml:"os" json:"os"`
     7  	Architecture enums.DroneCiPlatformArch `yaml:"arch" json:"arch"`
     8  	Version      int                       `yaml:"version,omitempty" json:"version,omitempty"`
     9  }
    10  
    11  func NewPipelinePlatform() *PipelinePlatform {
    12  	return new(PipelinePlatform)
    13  }
    14  
    15  func (p *PipelinePlatform) WithOS(os enums.DroneCiPlatformOs) *PipelinePlatform {
    16  	p.OS = os
    17  	return p
    18  }
    19  
    20  func (p *PipelinePlatform) WithArchitecture(arch enums.DroneCiPlatformArch) *PipelinePlatform {
    21  	p.Architecture = arch
    22  	return p
    23  }
    24  
    25  func (p *PipelinePlatform) WithVersion(v int) *PipelinePlatform {
    26  	p.Version = v
    27  	return p
    28  }