package MlFront_Thunk

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Source file ThunkAstDistributionType.ml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
type openbsd_signify_producer = ThunkDist.DistCore.openbsd_signify_producer = {
  openbsd_signify_public_key : ThunkLexers.Ranges.range_plus * string;
}

type github_slsa_v1_l2_producer =
      ThunkDist.DistCore.github_slsa_v1_l2_producer = {
  github_slsa_v1_l2_repository : ThunkLexers.Ranges.range_plus * string;
}

type github_slsa_v1_l3_producer =
      ThunkDist.DistCore.github_slsa_v1_l3_producer = {
  github_slsa_v1_l3_caller :
    ThunkLexers.Ranges.range_plus
    * [ `Organization of string | `Repository of string ];
  github_slsa_v1_l3_signer :
    ThunkLexers.Ranges.range_plus
    * [ `Repository of string | `Workflow of string ];
}

type producer = ThunkDist.DistCore.producer = {
  producer_openbsd_signify : openbsd_signify_producer option;
  producer_github_slsa_v1_l2 : github_slsa_v1_l2_producer option;
  producer_github_slsa_v1_l3 : github_slsa_v1_l3_producer option;
}

type license = ThunkDist.DistCore.license = {
  spdx : (ThunkLexers.Ranges.range_plus * string) option;
  plaintext : (ThunkLexers.Ranges.range_plus * string) option;
  markdown : (ThunkLexers.Ranges.range_plus * string) option;
}

type continuation_to_sign = ThunkDist.DistCore.continuation_to_sign = {
  majmin : ThunkLexers.Ranges.range_plus * int64 * int64;
  producer : producer;
}

type openbsd_signify_attestation =
      ThunkDist.DistCore.openbsd_signify_attestation = {
  openbsd_signify_signature : (ThunkLexers.Ranges.range_plus * string) option;
}

type github_slsa_v1_l2_attestation =
      ThunkDist.DistCore.github_slsa_v1_l2_attestation = {
  github_slsa_v1_l2_doc : ThunkParsers.JsonParsers.json_for_fmlib option;
}

type github_slsa_v1_l3_attestation =
      ThunkDist.DistCore.github_slsa_v1_l3_attestation = {
  github_slsa_v1_l3_doc : ThunkParsers.JsonParsers.json_for_fmlib option;
}

type continuations_attestation =
      ThunkDist.DistCore.continuations_attestation = {
  continuations_attestation_openbsd_signify : openbsd_signify_attestation option;
}

type continuations = ThunkDist.DistCore.continuations = {
  continuations_attestation : continuations_attestation option;
  continuations_to_sign : continuation_to_sign list;
}

type dist_core = ThunkDist.DistCore.t = {
  id :
    (ThunkLexers.Ranges.range_plus
    * MlFront_Core.LibraryId.t
    * ThunkSemver64Rep.t)
    option;
  producer : producer;
  license : license;
  continuations : continuations;
}

type build_attestation = ThunkDist.build_attestation = {
  attestation_openbsd_signify :
    (ThunkLexers.Ranges.range_plus * openbsd_signify_attestation) option;
  attestation_github_slsa_v1_l2 :
    (ThunkLexers.Ranges.range_plus * github_slsa_v1_l2_attestation) option;
  attestation_github_slsa_v1_l3 :
    (ThunkLexers.Ranges.range_plus * github_slsa_v1_l3_attestation) option;
}

type build_trace = ThunkDist.build_trace = {
  trace_tag : ThunkLexers.Ranges.range_plus * string;
  trace_path : ThunkLexers.Ranges.range_plus * string;
}

type build_value = ThunkDist.build_value = {
  value_path : ThunkLexers.Ranges.range_plus * string;
}

type build_to_sign = ThunkDist.build_to_sign = {
  build_bundle_id :
    ThunkLexers.Ranges.range_plus
    * MlFront_Core.StandardModuleId.t
    * ThunkSemver64Rep.t;
  build_modules :
    (ThunkLexers.Ranges.range_plus
    * MlFront_Core.StandardModuleId.t
    * ThunkSemver64Rep.t)
    list;
  build_producer_accepts : (ThunkLexers.Ranges.range_plus * string) list;
  build_bundle_canonical : ThunkLexers.Ranges.range_plus * string;
  build_traces : build_trace * build_trace list;
  build_values : build_value list;
}

type build = ThunkDist.build = {
  build_attestation : build_attestation option;
  build_to_sign : build_to_sign;
}

type distribution = {
  distribution_canonical_id : string;
  distribution_id :
    compare_free_range * MlFront_Core.LibraryId.t * ThunkSemver64.t;
  producer : producer;
  license : license;
  continuations : continuations;
  build : build;
}

and compare_free_range = (Fmlib_parse.Position.range[@compare fun _a _b -> 0])

let compare_distribution { distribution_canonical_id = a1; _ }
    { distribution_canonical_id = a2; _ } =
  String.compare a1 a2