MCPcopy Create free account
hub / github.com/docker/docker-language-server / serviceProperties

Function serviceProperties

internal/compose/completion_test.go:60–795  ·  view source on GitHub ↗
(line, character, prefixLength protocol.UInteger, spacing string)

Source from the content-addressed store, hash-verified

58}
59
60func serviceProperties(line, character, prefixLength protocol.UInteger, spacing string) []protocol.CompletionItem {
61 return []protocol.CompletionItem{
62 {
63 Label: "annotations",
64 Detail: types.CreateStringPointer("array or object"),
65 Documentation: "Either a dictionary mapping keys to values, or a list of strings.",
66 TextEdit: textEdit(fmt.Sprintf("annotations:\n%v ", spacing), line, character, prefixLength),
67 InsertTextMode: types.CreateInsertTextModePointer(protocol.InsertTextModeAsIs),
68 InsertTextFormat: types.CreateInsertTextFormatPointer(protocol.InsertTextFormatSnippet),
69 },
70 {
71 Label: "attach",
72 Detail: types.CreateStringPointer("boolean or string"),
73 TextEdit: textEdit("attach: ${1|true,false|}", line, character, prefixLength),
74 InsertTextMode: types.CreateInsertTextModePointer(protocol.InsertTextModeAsIs),
75 InsertTextFormat: types.CreateInsertTextFormatPointer(protocol.InsertTextFormatSnippet),
76 },
77 {
78 Label: "blkio_config",
79 Detail: types.CreateStringPointer("object"),
80 Documentation: "Block IO configuration for the service.",
81 TextEdit: textEdit(fmt.Sprintf("blkio_config:\n%v ", spacing), line, character, prefixLength),
82 InsertTextMode: types.CreateInsertTextModePointer(protocol.InsertTextModeAsIs),
83 InsertTextFormat: types.CreateInsertTextFormatPointer(protocol.InsertTextFormatSnippet),
84 },
85 {
86 Label: "build",
87 Detail: types.CreateStringPointer("object or string"),
88 Documentation: "Configuration options for building the service's image.",
89 TextEdit: textEdit("build:", line, character, prefixLength),
90 InsertTextMode: types.CreateInsertTextModePointer(protocol.InsertTextModeAsIs),
91 InsertTextFormat: types.CreateInsertTextFormatPointer(protocol.InsertTextFormatSnippet),
92 },
93 {
94 Label: "cap_add",
95 Detail: types.CreateStringPointer("array"),
96 Documentation: "Add Linux capabilities. For example, 'CAP_SYS_ADMIN', 'SYS_ADMIN', or 'NET_ADMIN'.",
97 TextEdit: textEdit(fmt.Sprintf("cap_add:\n%v - ", spacing), line, character, prefixLength),
98 InsertTextMode: types.CreateInsertTextModePointer(protocol.InsertTextModeAsIs),
99 InsertTextFormat: types.CreateInsertTextFormatPointer(protocol.InsertTextFormatSnippet),
100 },
101 {
102 Label: "cap_drop",
103 Detail: types.CreateStringPointer("array"),
104 Documentation: "Drop Linux capabilities. For example, 'CAP_SYS_ADMIN', 'SYS_ADMIN', or 'NET_ADMIN'.",
105 TextEdit: textEdit(fmt.Sprintf("cap_drop:\n%v - ", spacing), line, character, prefixLength),
106 InsertTextMode: types.CreateInsertTextModePointer(protocol.InsertTextModeAsIs),
107 InsertTextFormat: types.CreateInsertTextFormatPointer(protocol.InsertTextFormatSnippet),
108 },
109 {
110 Label: "cgroup",
111 Detail: types.CreateStringPointer("string"),
112 Documentation: "Specify the cgroup namespace to join. Use 'host' to use the host's cgroup namespace, or 'private' to use a private cgroup namespace.",
113 TextEdit: textEdit("cgroup: ${1|host,private|}", line, character, prefixLength),
114 InsertTextMode: types.CreateInsertTextModePointer(protocol.InsertTextModeAsIs),
115 InsertTextFormat: types.CreateInsertTextFormatPointer(protocol.InsertTextFormatSnippet),
116 },
117 {

Callers 1

TestCompletion_SchemaFunction · 0.85

Calls 4

CreateStringPointerFunction · 0.92
textEditFunction · 0.85

Tested by

no test coverage detected