package b0

  1. Overview
  2. Docs
Software construction and deployment kit

Install

Dune Dependency

Authors

Maintainers

Sources

b0-0.0.5.tbz
sha512=00a6868b4dfa34565d0141b335622a81a0e8d5b9e3c6dfad025dabfa3df2db2a1302b492953bbbce30c3a4406c324fcec25250a00b38f6d18a69e15605e3b07e

doc/b0_b00_kit/B00_github/Auth/index.html

Module B00_github.Auth

type t

The type for GitHub authentication.

val v : user:string option -> unit -> (t, string) Stdlib.result

auth ~http ~user () determines authentication via personal access token for user user. It the latter is unspecified it first looks up the contents of the B0_GITHUB_TOKEN environment variable if that fails it looks up for an existing token in the B0_std.Os.Dir.config () /b0/github/$USER.token file. If that fails instructions are printed on how to setup the token.

val user : t -> string

user a is the GitHub user.

val token : t -> string

token a is the Github token.

Command line interface

val user_env : string

user_env is "B0_GITHUB_USER".

val token_env : string

user_env is "B0_GITHUB_TOKEN".

val envs : Cmdliner.Cmd.Env.info list

envs describe user_env and token_env.

val cli : ?opts:string list -> unit -> (t, string) Stdlib.result Cmdliner.Term.t

cli () is a command line interface for GitHub authentication. opts are the options that can be used for specifiying the github user (defaults to ["u";"github"])

OCaml

Innovation. Community. Security.