update comment formatting
This commit is contained in:
parent
825e135ec1
commit
c163802db3
|
@ -1,18 +1,20 @@
|
||||||
/*
|
/*
|
||||||
Copyright 2022 Dolysis Consulting Limited
|
** Copyright 2022 Dolysis Consulting Limited
|
||||||
|
**
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
** Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
you may not use this file except in compliance with the License.
|
** you may not use this file except in compliance with the License.
|
||||||
You may obtain a copy of the License at
|
** You may obtain a copy of the License at
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
**
|
||||||
Unless required by applicable law or agreed to in writing, software
|
** http://www.apache.org/licenses/LICENSE-2.0
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
**
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
** Unless required by applicable law or agreed to in writing, software
|
||||||
See the License for the specific language governing permissions and
|
** distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
limitations under the License.
|
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
** See the License for the specific language governing permissions and
|
||||||
For changes see the git log
|
** limitations under the License.
|
||||||
*/
|
**
|
||||||
|
** For changes see the git log
|
||||||
|
*/
|
||||||
package ipp
|
package ipp
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
|
|
@ -1,18 +1,20 @@
|
||||||
/*
|
/*
|
||||||
Copyright 2022 Dolysis Consulting Limited
|
** Copyright 2022 Dolysis Consulting Limited
|
||||||
|
**
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
** Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
you may not use this file except in compliance with the License.
|
** you may not use this file except in compliance with the License.
|
||||||
You may obtain a copy of the License at
|
** You may obtain a copy of the License at
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
**
|
||||||
Unless required by applicable law or agreed to in writing, software
|
** http://www.apache.org/licenses/LICENSE-2.0
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
**
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
** Unless required by applicable law or agreed to in writing, software
|
||||||
See the License for the specific language governing permissions and
|
** distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
limitations under the License.
|
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
** See the License for the specific language governing permissions and
|
||||||
For changes see the git log
|
** limitations under the License.
|
||||||
*/
|
**
|
||||||
|
** For changes see the git log
|
||||||
|
*/
|
||||||
package ipp
|
package ipp
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
@ -56,8 +58,8 @@ func NewSocketAdapter(host string, useTLS bool) *SocketAdapter {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//DoRequest performs the given IPP request to the given URL, returning the IPP response or an error if one occurred.
|
// DoRequest performs the given IPP request to the given URL, returning the IPP response or an error if one occurred.
|
||||||
//Additional data will be written to an io.Writer if additionalData is not nil
|
// Additional data will be written to an io.Writer if additionalData is not nil
|
||||||
func (h *SocketAdapter) SendRequest(url string, r *Request, additionalData io.Writer) (*Response, error) {
|
func (h *SocketAdapter) SendRequest(url string, r *Request, additionalData io.Writer) (*Response, error) {
|
||||||
for i := 0; i < h.RequestRetryLimit; i++ {
|
for i := 0; i < h.RequestRetryLimit; i++ {
|
||||||
// encode request
|
// encode request
|
||||||
|
@ -147,7 +149,7 @@ func (h *SocketAdapter) SendRequest(url string, r *Request, additionalData io.Wr
|
||||||
return nil, errors.New("request retry limit exceeded")
|
return nil, errors.New("request retry limit exceeded")
|
||||||
}
|
}
|
||||||
|
|
||||||
//GetSocket returns the path to the cupsd socket by searching SocketSearchPaths
|
// GetSocket returns the path to the cupsd socket by searching SocketSearchPaths
|
||||||
func (h *SocketAdapter) GetSocket() (string, error) {
|
func (h *SocketAdapter) GetSocket() (string, error) {
|
||||||
for _, path := range h.SocketSearchPaths {
|
for _, path := range h.SocketSearchPaths {
|
||||||
fi, err := os.Stat(path)
|
fi, err := os.Stat(path)
|
||||||
|
@ -168,7 +170,7 @@ func (h *SocketAdapter) GetSocket() (string, error) {
|
||||||
return "", SocketNotFoundError
|
return "", SocketNotFoundError
|
||||||
}
|
}
|
||||||
|
|
||||||
//GetCert returns the current CUPs authentication certificate by searching CertSearchPaths
|
// GetCert returns the current CUPs authentication certificate by searching CertSearchPaths
|
||||||
func (h *SocketAdapter) GetCert() (string, error) {
|
func (h *SocketAdapter) GetCert() (string, error) {
|
||||||
for _, path := range h.CertSearchPaths {
|
for _, path := range h.CertSearchPaths {
|
||||||
f, err := os.Open(path)
|
f, err := os.Open(path)
|
||||||
|
|
30
adapter.go
30
adapter.go
|
@ -1,18 +1,20 @@
|
||||||
/*
|
/*
|
||||||
Copyright 2022 Dolysis Consulting Limited
|
** Copyright 2022 Dolysis Consulting Limited
|
||||||
|
**
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
** Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
you may not use this file except in compliance with the License.
|
** you may not use this file except in compliance with the License.
|
||||||
You may obtain a copy of the License at
|
** You may obtain a copy of the License at
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
**
|
||||||
Unless required by applicable law or agreed to in writing, software
|
** http://www.apache.org/licenses/LICENSE-2.0
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
**
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
** Unless required by applicable law or agreed to in writing, software
|
||||||
See the License for the specific language governing permissions and
|
** distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
limitations under the License.
|
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
** See the License for the specific language governing permissions and
|
||||||
For changes see the git log
|
** limitations under the License.
|
||||||
*/
|
**
|
||||||
|
** For changes see the git log
|
||||||
|
*/
|
||||||
package ipp
|
package ipp
|
||||||
|
|
||||||
import "io"
|
import "io"
|
||||||
|
|
30
attribute.go
30
attribute.go
|
@ -1,18 +1,20 @@
|
||||||
/*
|
/*
|
||||||
Copyright 2022 Dolysis Consulting Limited
|
** Copyright 2022 Dolysis Consulting Limited
|
||||||
|
**
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
** Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
you may not use this file except in compliance with the License.
|
** you may not use this file except in compliance with the License.
|
||||||
You may obtain a copy of the License at
|
** You may obtain a copy of the License at
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
**
|
||||||
Unless required by applicable law or agreed to in writing, software
|
** http://www.apache.org/licenses/LICENSE-2.0
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
**
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
** Unless required by applicable law or agreed to in writing, software
|
||||||
See the License for the specific language governing permissions and
|
** distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
limitations under the License.
|
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
** See the License for the specific language governing permissions and
|
||||||
For changes see the git log
|
** limitations under the License.
|
||||||
*/
|
**
|
||||||
|
** For changes see the git log
|
||||||
|
*/
|
||||||
package ipp
|
package ipp
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
|
|
@ -1,18 +1,20 @@
|
||||||
/*
|
/*
|
||||||
Copyright 2022 Dolysis Consulting Limited
|
** Copyright 2022 Dolysis Consulting Limited
|
||||||
|
**
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
** Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
you may not use this file except in compliance with the License.
|
** you may not use this file except in compliance with the License.
|
||||||
You may obtain a copy of the License at
|
** You may obtain a copy of the License at
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
**
|
||||||
Unless required by applicable law or agreed to in writing, software
|
** http://www.apache.org/licenses/LICENSE-2.0
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
**
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
** Unless required by applicable law or agreed to in writing, software
|
||||||
See the License for the specific language governing permissions and
|
** distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
limitations under the License.
|
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
** See the License for the specific language governing permissions and
|
||||||
For changes see the git log
|
** limitations under the License.
|
||||||
*/
|
**
|
||||||
|
** For changes see the git log
|
||||||
|
*/
|
||||||
package ipp
|
package ipp
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
|
30
constants.go
30
constants.go
|
@ -1,18 +1,20 @@
|
||||||
/*
|
/*
|
||||||
Copyright 2022 Dolysis Consulting Limited
|
** Copyright 2022 Dolysis Consulting Limited
|
||||||
|
**
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
** Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
you may not use this file except in compliance with the License.
|
** you may not use this file except in compliance with the License.
|
||||||
You may obtain a copy of the License at
|
** You may obtain a copy of the License at
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
**
|
||||||
Unless required by applicable law or agreed to in writing, software
|
** http://www.apache.org/licenses/LICENSE-2.0
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
**
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
** Unless required by applicable law or agreed to in writing, software
|
||||||
See the License for the specific language governing permissions and
|
** distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
limitations under the License.
|
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
** See the License for the specific language governing permissions and
|
||||||
For changes see the git log
|
** limitations under the License.
|
||||||
*/
|
**
|
||||||
|
** For changes see the git log
|
||||||
|
*/
|
||||||
package ipp
|
package ipp
|
||||||
|
|
||||||
// ipp status codes
|
// ipp status codes
|
||||||
|
|
|
@ -1,18 +1,20 @@
|
||||||
/*
|
/*
|
||||||
Copyright 2022 Dolysis Consulting Limited
|
** Copyright 2022 Dolysis Consulting Limited
|
||||||
|
**
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
** Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
you may not use this file except in compliance with the License.
|
** you may not use this file except in compliance with the License.
|
||||||
You may obtain a copy of the License at
|
** You may obtain a copy of the License at
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
**
|
||||||
Unless required by applicable law or agreed to in writing, software
|
** http://www.apache.org/licenses/LICENSE-2.0
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
**
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
** Unless required by applicable law or agreed to in writing, software
|
||||||
See the License for the specific language governing permissions and
|
** distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
limitations under the License.
|
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
** See the License for the specific language governing permissions and
|
||||||
For changes see the git log
|
** limitations under the License.
|
||||||
*/
|
**
|
||||||
|
** For changes see the git log
|
||||||
|
*/
|
||||||
package ipp
|
package ipp
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
|
30
error.go
30
error.go
|
@ -1,18 +1,20 @@
|
||||||
/*
|
/*
|
||||||
Copyright 2022 Dolysis Consulting Limited
|
** Copyright 2022 Dolysis Consulting Limited
|
||||||
|
**
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
** Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
you may not use this file except in compliance with the License.
|
** you may not use this file except in compliance with the License.
|
||||||
You may obtain a copy of the License at
|
** You may obtain a copy of the License at
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
**
|
||||||
Unless required by applicable law or agreed to in writing, software
|
** http://www.apache.org/licenses/LICENSE-2.0
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
**
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
** Unless required by applicable law or agreed to in writing, software
|
||||||
See the License for the specific language governing permissions and
|
** distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
limitations under the License.
|
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
** See the License for the specific language governing permissions and
|
||||||
For changes see the git log
|
** limitations under the License.
|
||||||
*/
|
**
|
||||||
|
** For changes see the git log
|
||||||
|
*/
|
||||||
package ipp
|
package ipp
|
||||||
|
|
||||||
import "fmt"
|
import "fmt"
|
||||||
|
|
|
@ -1,18 +1,20 @@
|
||||||
/*
|
/*
|
||||||
Copyright 2022 Dolysis Consulting Limited
|
** Copyright 2022 Dolysis Consulting Limited
|
||||||
|
**
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
** Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
you may not use this file except in compliance with the License.
|
** you may not use this file except in compliance with the License.
|
||||||
You may obtain a copy of the License at
|
** You may obtain a copy of the License at
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
**
|
||||||
Unless required by applicable law or agreed to in writing, software
|
** http://www.apache.org/licenses/LICENSE-2.0
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
**
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
** Unless required by applicable law or agreed to in writing, software
|
||||||
See the License for the specific language governing permissions and
|
** distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
limitations under the License.
|
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
** See the License for the specific language governing permissions and
|
||||||
For changes see the git log
|
** limitations under the License.
|
||||||
*/
|
**
|
||||||
|
** For changes see the git log
|
||||||
|
*/
|
||||||
package ipp
|
package ipp
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
|
30
request.go
30
request.go
|
@ -1,18 +1,20 @@
|
||||||
/*
|
/*
|
||||||
Copyright 2022 Dolysis Consulting Limited
|
** Copyright 2022 Dolysis Consulting Limited
|
||||||
|
**
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
** Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
you may not use this file except in compliance with the License.
|
** you may not use this file except in compliance with the License.
|
||||||
You may obtain a copy of the License at
|
** You may obtain a copy of the License at
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
**
|
||||||
Unless required by applicable law or agreed to in writing, software
|
** http://www.apache.org/licenses/LICENSE-2.0
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
**
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
** Unless required by applicable law or agreed to in writing, software
|
||||||
See the License for the specific language governing permissions and
|
** distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
limitations under the License.
|
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
** See the License for the specific language governing permissions and
|
||||||
For changes see the git log
|
** limitations under the License.
|
||||||
*/
|
**
|
||||||
|
** For changes see the git log
|
||||||
|
*/
|
||||||
package ipp
|
package ipp
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
|
30
response.go
30
response.go
|
@ -1,18 +1,20 @@
|
||||||
/*
|
/*
|
||||||
Copyright 2022 Dolysis Consulting Limited
|
** Copyright 2022 Dolysis Consulting Limited
|
||||||
|
**
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
** Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
you may not use this file except in compliance with the License.
|
** you may not use this file except in compliance with the License.
|
||||||
You may obtain a copy of the License at
|
** You may obtain a copy of the License at
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
**
|
||||||
Unless required by applicable law or agreed to in writing, software
|
** http://www.apache.org/licenses/LICENSE-2.0
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
**
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
** Unless required by applicable law or agreed to in writing, software
|
||||||
See the License for the specific language governing permissions and
|
** distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
limitations under the License.
|
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
** See the License for the specific language governing permissions and
|
||||||
For changes see the git log
|
** limitations under the License.
|
||||||
*/
|
**
|
||||||
|
** For changes see the git log
|
||||||
|
*/
|
||||||
package ipp
|
package ipp
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
|
30
utils.go
30
utils.go
|
@ -1,18 +1,20 @@
|
||||||
/*
|
/*
|
||||||
Copyright 2022 Dolysis Consulting Limited
|
** Copyright 2022 Dolysis Consulting Limited
|
||||||
|
**
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
** Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
you may not use this file except in compliance with the License.
|
** you may not use this file except in compliance with the License.
|
||||||
You may obtain a copy of the License at
|
** You may obtain a copy of the License at
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
**
|
||||||
Unless required by applicable law or agreed to in writing, software
|
** http://www.apache.org/licenses/LICENSE-2.0
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
**
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
** Unless required by applicable law or agreed to in writing, software
|
||||||
See the License for the specific language governing permissions and
|
** distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
limitations under the License.
|
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
** See the License for the specific language governing permissions and
|
||||||
For changes see the git log
|
** limitations under the License.
|
||||||
*/
|
**
|
||||||
|
** For changes see the git log
|
||||||
|
*/
|
||||||
package ipp
|
package ipp
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
|
Loading…
Reference in New Issue