Movatterモバイル変換


[0]ホーム

URL:


macOS

packagestandard library
go1.25.2Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 7, 2025 License:BSD-3-ClauseImports:7Imported by:0

Details

Repository

cs.opensource.google/go/go

Links

Documentation

Rendered for darwin/amd64

Overview

Package macOS provides cgo-less wrappers for Core Foundation andSecurity.framework, similarly to how package syscall provides access tolibSystem.dylib.

Index

Constants

View Source
const (// various macOS error codes that can be returned from// SecTrustEvaluateWithError that we can map to Go cert// verification error types.ErrSecCertificateExpired = -67818ErrSecHostNameMismatch   = -67602ErrSecNotTrusted         = -67843)

Variables

This section is empty.

Functions

funcCFArrayAppendValueadded ingo1.18

func CFArrayAppendValue(arrayCFRef, valCFRef)

funcCFArrayGetCount

func CFArrayGetCount(arrayCFRef)int

funcCFDataGetBytePtr

func CFDataGetBytePtr(dataCFRef)uintptr

funcCFDataGetLength

func CFDataGetLength(dataCFRef)int

funcCFDataToSlice

func CFDataToSlice(dataCFRef) []byte

CFDataToSlice returns a copy of the contents of data as a bytes slice.

funcCFEqual

func CFEqual(a, bCFRef)bool

funcCFErrorGetCodeadded ingo1.18.10

func CFErrorGetCode(errRefCFRef)int

funcCFNumberGetValue

func CFNumberGetValue(numCFRef) (int32,error)

funcCFRelease

func CFRelease(refCFRef)

funcCFStringToStringadded ingo1.18

func CFStringToString(refCFRef)string

CFStringToString returns a Go string representation of the passedin CFString, or an empty string if it's invalid.

funcReleaseCFArrayadded ingo1.18

func ReleaseCFArray(arrayCFRef)

ReleaseCFArray iterates through an array, releasing its contents, and thenreleases the array itself. This is necessary because we cannot, easily, set theCFArrayCallBacks argument when creating CFArrays.

funcSecCertificateCopyDataadded ingo1.18

func SecCertificateCopyData(certCFRef) ([]byte,error)

funcSecTrustEvaluateWithErroradded ingo1.18

func SecTrustEvaluateWithError(trustObjCFRef) (int,error)

funcSecTrustSetVerifyDateadded ingo1.18

func SecTrustSetVerifyDate(trustObjCFRef, dateRefCFRef)error

Types

typeCFRef

type CFRefuintptr

CFRef is an opaque reference to a Core Foundation object. It is a pointer,but to memory not owned by Go, so not an unsafe.Pointer.

funcBytesToCFDataadded ingo1.18

func BytesToCFData(b []byte)CFRef

funcCFArrayCreateMutableadded ingo1.18

func CFArrayCreateMutable()CFRef

funcCFArrayGetValueAtIndex

func CFArrayGetValueAtIndex(arrayCFRef, indexint)CFRef

funcCFDateCreateadded ingo1.18

func CFDateCreate(secondsfloat64)CFRef

funcCFDictionaryGetValueIfPresent

func CFDictionaryGetValueIfPresent(dictCFRef, keyCFString) (valueCFRef, okbool)

funcCFErrorCopyDescriptionadded ingo1.18

func CFErrorCopyDescription(errRefCFRef)CFRef

funcCFStringCreateExternalRepresentationadded ingo1.18

func CFStringCreateExternalRepresentation(strRefCFRef) (CFRef,error)

funcSecCertificateCreateWithDataadded ingo1.18

func SecCertificateCreateWithData(b []byte) (CFRef,error)

funcSecPolicyCreateSSLadded ingo1.18

func SecPolicyCreateSSL(namestring) (CFRef,error)

funcSecTrustCopyCertificateChainadded ingo1.25.0

func SecTrustCopyCertificateChain(trustObjCFRef) (CFRef,error)

funcSecTrustCreateWithCertificatesadded ingo1.18

func SecTrustCreateWithCertificates(certsCFRef, policiesCFRef) (CFRef,error)

funcSecTrustEvaluateadded ingo1.18

func SecTrustEvaluate(trustObjCFRef) (CFRef,error)

funcTimeToCFDateRefadded ingo1.18

func TimeToCFDateRef(ttime.Time)CFRef

TimeToCFDateRef converts a time.Time into an apple CFDateRef.

typeCFString

type CFStringCFRef

funcStringToCFString

func StringToCFString(sstring)CFString

StringToCFString returns a copy of the UTF-8 contents of s as a new CFString.

typeOSStatus

type OSStatus struct {// contains filtered or unexported fields}

func (OSStatus)Error

func (sOSStatus) Error()string

Source Files

View all Source files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f orF : Jump to
y orY : Canonical URL
go.dev uses cookies from Google to deliver and enhance the quality of its services and to analyze traffic.Learn more.

[8]ページ先頭

©2009-2025 Movatter.jp