Documentation ¶
Index ¶
Constants ¶
View Source
const ( DroneServerVariable = "DRONE_SERVER" DroneTokenVariable = "DRONE_TOKEN" )
Variables ¶
This section is empty.
Functions ¶
func CreateClient ¶
func CreateClient(credential Credential) drone.Client
Creates a Drone client with the provided credential.
This function takes a Credential struct as input, containing the Drone host and token. It creates an OAuth2 client configuration and authorizes it using the provided access token. Then, it constructs a Drone client using the specified host and the authorized OAuth2 client.
Parameters:
- credential: A Credential struct containing the Drone host and access token.
Returns:
- drone.Client: A configured Drone client for making API requests to the specified Drone instance.
Types ¶
type Credential ¶
Click to show internal directories.
Click to hide internal directories.