github.com/drone/runner-go@v1.12.0/manifest/driver.go (about)

     1  // Copyright 2019 Drone.IO Inc. All rights reserved.
     2  // Use of this source code is governed by the Polyform License
     3  // that can be found in the LICENSE file.
     4  
     5  package manifest
     6  
     7  // registered drivers.
     8  var drivers []Driver
     9  
    10  // Register registers the parsing driver.
    11  func Register(driver Driver) {
    12  	drivers = append(drivers, driver)
    13  }
    14  
    15  // Driver defines a parser driver that can be used to parse
    16  // resource-specific Yaml documents.
    17  type Driver func(r *RawResource) (Resource, bool, error)