Documentation
¶
Index ¶
- func CreateExcl(path string, perm os.FileMode) (*os.File, error)
- func CreateNoLinks(path string, perm os.FileMode) (*os.File, error)
- func GetAuthConfig(_ context.Context, optionalCert *x509.Certificate) (*tls.Config, error)
- func GetAuthContext(ctx context.Context, tokenPath string) context.Context
- func GetPerRPCCreds(tokenPath string) oauth.TokenSource
- func NoNullByteString(s string) bool
- func NoNullByteURL(u string) bool
- func OpenNoLinks(path string) (*os.File, error)
- func ReadFileNoLinks(path string) ([]byte, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateExcl ¶
CreateExcl creates a new file at the given path with the specified permissions, failing if the file exists or if the path is a symbolic or hard link.
func CreateNoLinks ¶
CreateNoLinks creates or truncates the file at the given path with the specified permissions, failing if the path is a symbolic or hard link.
func GetAuthConfig ¶
GetAuthConfig returns a TLS configuration for secure communication with the server.
func GetAuthContext ¶
GetAuthContext creates a new context with an authorization header.
func GetPerRPCCreds ¶
func GetPerRPCCreds(tokenPath string) oauth.TokenSource
GetPerRPCCreds returns a PerRPCCredentials object that can be used for gRPC authentication.
func NoNullByteString ¶
NoNullByteString checks if the provided string does not contain any null bytes.
func NoNullByteURL ¶
NoNullByteURL checks if the provided URL string does not contain any null bytes.
func OpenNoLinks ¶
OpenNoLinks opens the file at the given path for reading, failing if the path is a symbolic or hard link.
func ReadFileNoLinks ¶
ReadFileNoLinks reads and returns the contents of the file at the given path, failing if the path is a symbolic or hard link.
Types ¶
This section is empty.