Skip to content

Commit

Permalink
chore: add license headers for samples (#106)
Browse files Browse the repository at this point in the history
  • Loading branch information
JustinBeckwith authored Nov 14, 2019
1 parent 58ff97c commit cecf4d8
Show file tree
Hide file tree
Showing 15 changed files with 240 additions and 0 deletions.
16 changes: 16 additions & 0 deletions container-analysis/snippets/createNote.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
// Copyright 2019 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

'use strict';

// sample-metadata:
// title: Create Note
// description: Creates a Note with specified ID
Expand Down
16 changes: 16 additions & 0 deletions container-analysis/snippets/createOccurrence.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
// Copyright 2019 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

'use strict';

// sample-metadata:
// title: Create Occurrence
// description: Creates an Occurrence of a Note and attaches it as a metadata to an image
Expand Down
16 changes: 16 additions & 0 deletions container-analysis/snippets/deleteNote.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
// Copyright 2019 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

'use strict';

// sample-metadata:
// title: Delete Note
// description: Deletes a specified Note
Expand Down
16 changes: 16 additions & 0 deletions container-analysis/snippets/deleteOccurrence.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
// Copyright 2019 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

'use strict';

// sample-metadata:
// title: Delete Occurrence
// description: Deletes a specified Occurrence
Expand Down
16 changes: 16 additions & 0 deletions container-analysis/snippets/getDiscoveryInfo.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
// Copyright 2019 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

'use strict';

// sample-metadata:
// title: Get Discovery Info
// description: Gets all Discovery Occurrences attached to specified image
Expand Down
16 changes: 16 additions & 0 deletions container-analysis/snippets/getNote.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
// Copyright 2019 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

'use strict';

// sample-metadata:
// title: Get Note
// description: Retrieves and prints a specified note
Expand Down
16 changes: 16 additions & 0 deletions container-analysis/snippets/getOccurrence.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
// Copyright 2019 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

'use strict';

// sample-metadata:
// title: Get Occurrence
// description: Retrieves and prints a specified Occurrence
Expand Down
16 changes: 16 additions & 0 deletions container-analysis/snippets/highVulnerabilitiesForImage.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
// Copyright 2019 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

'use strict';

// sample-metadata:
// title: Get High Vulnerabilities for Image
// description: Retrieves all Vulnerability Occurrences of High Severity from Specified Image
Expand Down
16 changes: 16 additions & 0 deletions container-analysis/snippets/occurrencePubSub.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
// Copyright 2019 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

'use strict';

// sample-metadata:
// title: Occurrence PubSub
// description: Polls a specified PubSub subscription for Occurrences. Requires a subscription to a topic named 'container-analysis-occurrences-v1'
Expand Down
16 changes: 16 additions & 0 deletions container-analysis/snippets/occurrencesForImage.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
// Copyright 2019 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

'use strict';

// sample-metadata:
// title: Occurrences for Image
// description: Retrieves all Occurrences attached to the metadata of a specified image
Expand Down
16 changes: 16 additions & 0 deletions container-analysis/snippets/occurrencesForNote.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
// Copyright 2019 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

'use strict';

// sample-metadata:
// title: Occurrences for Note
// description: Retrieves all Occurrences of a specified Note
Expand Down
16 changes: 16 additions & 0 deletions container-analysis/snippets/pollDiscoveryOccurrenceFinished.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
// Copyright 2019 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

'use strict';

// sample-metadata:
// title: Poll Discovery Occurrence Finished
// description: Waits for a Discovery Occurrence to reach a terminal state
Expand Down
16 changes: 16 additions & 0 deletions container-analysis/snippets/quickstart.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
// Copyright 2019 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

'use strict';

// sample-metadata:
// title: Quickstart
// description: fetching an instance of Grafeas and creating a note.
Expand Down
16 changes: 16 additions & 0 deletions container-analysis/snippets/test/containerAnalysis.test.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
// Copyright 2019 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

'use strict';

const {assert} = require('chai');
const cp = require('child_process');
const uuid = require(`uuid`);
Expand Down
16 changes: 16 additions & 0 deletions container-analysis/snippets/vulnerabilityOccurrencesForImage.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
// Copyright 2019 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

'use strict';

// sample-metadata:
// title: Vulnerability Occurrences for Image
// description: Retrieves all Vulnerability Occurrences attached to a specified image
Expand Down

0 comments on commit cecf4d8

Please sign in to comment.